Browse our Products

Aspose.OCR for Java 24.10.0 - Release Notes

Deprecation warning

What was changed

KeySummaryCategory
OCRJAVA‑394Added the ability to reduce PDF file size at the expense of lower background image quality.New feature
OCRJAVA‑391Implemented next-get text-in-wild OCR model with improved recognition accuracy and multi-language support.Enhancement
OCRJAVA‑392Improved image orientation detection to prevent certain images to be incorrectly rotated upside-down.Enhancement

Public API changes and backwards compatibility

This section lists all public API changes introduced in Aspose.OCR for Java 24.10.0 that may affect the code of existing applications.

Added public APIs:

The following public APIs have been added to Aspose.OCR for Java 24.10.0 release:

PdfOptimizationMode enumeration

The optimization mode specifies the balance between file size and image quality of saved PDFs.

NameValueDescription
NONE0Do not optimize PDF size.
MAXIMUM_QUALITY1Optimize file size while preserving the highest image quality.
HIGH_QUALITY2Smaller PDF file size at the expense of sight image downsampling.
BALANCED3Downsample images to balance file size and image quality.
AGGRESSIVE4Significantly reduce the PDF file size at the expense of lower image quality.

Updated public APIs:

No changes.

Removed public APIs:

No changes.

Examples

The code samples below illustrate the changes introduced in this release:

Optimize searchable PDF file size

AsposeOCR api = new AsposeOCR();
// Add an image to OcrInput object
OcrInput input = new OcrInput(InputType.SingleImage);
input.Add("page1.png");
input.Add("page2.png");
// Recognize image
ArrayList<RecognitionResult> results = api.Recognize(input);
// Save all pages to PDF document
AsposeOcr.SaveMultipageDocument("result.pdf", Format.Pdf, results, null, PdfOptimizationMode.BALANCED);