Browse our Products

Aspose.OCR for Python via .NET 24.12.0 - Release Notes

Deprecation warning

What was changed

KeySummaryCategory
OCRPY‑77Added a container object for storing recognition results.New feature
OCRPY‑77Added support for recognizing Mongolian texts.New feature
OCRPY‑77Significantly enhanced the performance of saving recognition results to searchable PDFs.Enhancement
OCRPY‑77Improved the calculation of line height in searchable PDFs.Enhancement

Public API changes and backwards compatibility

This section lists all public API changes introduced in Aspose.OCR for Python via .NET 24.12.0 that may affect the code of existing applications.

Added public APIs:

The following public APIs have been added to Aspose.OCR for Python via .NET 24.12.0 release:

OcrOutput

A container object that stores recognition results, which is returned from all recognition methods instead of a list of RecognitionResult objects.

This object is fully backward compatible with the list of RecognitionResult objects, which means you do not have to update your existing code.

Updated public APIs:

The following public APIs have been updated in Aspose.OCR for Python via .NET 24.12.0 release:

Language

Aspose.OCR for Python via .NET can now extract texts in the following languages:

ValueAlphabet
Language.MONMongolian texts.

AsposeOcr.recognize()

This method now returns an optimized container object, OcrOutput. The return type is fully compatible with the previously returned list of RecognitionResult objects, so no code updates are necessary at the moment.

AsposeOcr.RecognizeHandwrittenText()

This method now returns an optimized container object, OcrOutput. The return type is fully compatible with the previously returned list of RecognitionResult objects, so no code updates are necessary at the moment.

AsposeOcr.recognize_receipt()

This method now returns an optimized container object, OcrOutput. The return type is fully compatible with the previously returned list of RecognitionResult objects, so no code updates are necessary at the moment.

AsposeOcr.recognize_invoice()

This method now returns an optimized container object, OcrOutput. The return type is fully compatible with the previously returned list of RecognitionResult objects, so no code updates are necessary at the moment.

AsposeOcr.recognize_id_card()

This method now returns an optimized container object, OcrOutput. The return type is fully compatible with the previously returned list of RecognitionResult objects, so no code updates are necessary at the moment.

AsposeOcr.recognize_car_plate()

This method now returns an optimized container object, OcrOutput. The return type is fully compatible with the previously returned list of RecognitionResult objects, so no code updates are necessary at the moment.

AsposeOcr.recognize_passport()

This method now returns an optimized container object, OcrOutput. The return type is fully compatible with the previously returned list of RecognitionResult objects, so no code updates are necessary at the moment.

AsposeOcr.recognize_lines()

This method now returns an optimized container object, OcrOutput. The return type is fully compatible with the previously returned list of RecognitionResult objects, so no code updates are necessary at the moment.

Removed public APIs:

No changes.

Examples

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

Mongolian text recognition

# Instantiate Aspose.OCR API
api = AsposeOcr()
# Add image to the recognition batch
input = OcrInput(InputType.SINGLE_IMAGE)
input.add("source.png")
# Recognize Mongolian text
recognitionSettings = RecognitionSettings()
recognitionSettings.language = Language.MON
# Extract text from image
result = api.recognize(input, recognitionSettings)
# Print recognition result
print(result[0].recognition_text)
input("Press Enter to continue...")