Browse our Products

Aspose.OCR for Java 22.4 - Release Notes

All Features

OCRJAVA-237Test ONNX runtime library new releasesEnhancement
OCRJAVA-235Implement algorithm for improved .xlsx file creation (placement of result by cells)Enhancement
OCRJAVA-236Implement algorithm for improved .txt file creation (placement of result by position)Enhancement
OCRJAVA-234Implement the ability to load PDF from InputStreamEnhancement


The next opportunities:

  • improved algorithm for XLSX files creation
  • improved algorithm for text files creation
  • added ability to recognize PDF from stream
  • update ONNX runtime to 1.11 version

Public API and Backwards Incompatible Changes


  • added method RecognizePdf(InputStream stream, DocumentRecognitionSettings settings) to the AsposeOCRPdf class

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
        AsposeOCRPdf apiPdf = new AsposeOCRPdf();
		DocumentRecognitionSettings set = new DocumentRecognitionSettings(1); // set pages amount
		// set.setDetectAreasMode(DetectAreasMode.PHOTO);
	    InputStream inputStream = new FileInputStream("test.pdf");
		ArrayList<RecognitionResult> result =  apiPdf.RecognizePdf(inputStream, set);
		for(int i = 0; i < result.size(); i++){
    		out.println("Result: \n" + result.get(i).recognitionText);