Browse our Products

Aspose.OCR for Java 21.12 - Release Notes

All Features

OCRJAVA-205Add .xlsx support for output formatEnhancement
OCRJAVA-198Searchable PDF output (with original text structure): input - imageEnhancement
OCRJAVA-200Consulting: Differences in .NET and Java versionBug


The next opportunities:

  • improved skew correction algorithm
  • added the ability to get an Excel document (.xlsx) as a result of recognition
  • added ability to get Searchable PDF and DOCX document with original text structure

Public API and Backwards Incompatible Changes


  • added case to the Format enum: Xlsx

Removed APIs

  • none

Will be deprecated

  • none

Usage Example

import static java.lang.System.out;

import java.awt.Rectangle;

import com.aspose.ocr.AsposeOCR;
import com.aspose.ocr.DocumentRecognitionSettings;
import com.aspose.ocr.CharactersAllowedType;
import com.aspose.ocr.License;
import com.aspose.ocr.RecognitionResult;
import com.aspose.ocr.RecognitionResult.LinesResult;
import com.aspose.ocr.metered.Metered;

public class App {
       public static void main(String[] args) {

         // set license    

        boolean resLicense = License.isValid();
        out.println("License is :" + resLicense);

        // Create api instance
        AsposeOCR api = new AsposeOCR();

        String file= "image.png";		
	    // settings object 
		RecognitionSettings set = new RecognitionSettings();
		// Save result in Excel file
		RecognitionResult result = api.RecognizePage(file, set);"D://imgs/test/java_test.xlsx", format);

		// Save result in multipage Excel file
		ArrayList<String> files = new ArrayList<String>();
		ArrayList<RecognitionResult> results = api.RecognizeMultiplePages(files, set);	
		AsposeOCR.SaveMultipageDocument("java.xlsx", Format.Xlsx, results);