Browse our Products

Aspose.OCR for .NET 23.6.0 - Release Notes

Deprecation warning

What was changed

KeySummaryCategory
OCRNET‑679Added the ability to save recognition results to searchable PDF files without keeping an original image in the background.New feature
OCRNET‑680Added detailed tracking of image processing and recognition progress.Enhancement
OCRNET‑669Revised the API licensing mechanism to support per-method licensing.Enhancement

Public API changes and backwards compatibility

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

Added public APIs:

The following public APIs have been introduced in this release:

Aspose.OCR.SaveFormat.PdfNoImg

When saving recognition results with this option, a textual PDF document is created, but the original images are not placed in the background. This can be useful when digitizing large amounts of high-quality text (such as books) so that the resulting file takes up much less space than using the Aspose.OCR.SaveFormat.Pdf parameter.

Updated public APIs:

The following public APIs have been introduced in this release:

Aspose.OCR.AsposeOcr.OcrProgress method

Progress tracking can be used not only to monitor bulk recognition of multiple images, but to also track the detailed progress of processing and recognizing a single image.

Removed public APIs:

No changes.

Examples

The examples below illustrates the changes introduced in this release:

Saving searchable PDF without background images

Aspose.OCR.AsposeOcr recognitionEngine = new Aspose.OCR.AsposeOcr();
// Add images to OcrInput object
Aspose.OCR.OcrInput input = new Aspose.OCR.OcrInput(Aspose.OCR.InputType.SingleImage);
input.Add("page1.png");
input.Add("page2.png");
// Recognize image
List<Aspose.OCR.RecognitionResult> results = recognitionEngine.Recognize(input);
// Save results
Aspose.OCR.AsposeOcr.SaveMultipageDocument("result.pdf", Aspose.OCR.SaveFormat.PdfNoImg, results);

Tracking image recognition progress

Aspose.OCR.AsposeOcr recognitionEngine = new Aspose.OCR.AsposeOcr();
// Add images to OcrInput object
Aspose.OCR.OcrInput input = new Aspose.OCR.OcrInput(Aspose.OCR.InputType.SingleImage);
input.Add("page1.png");
// Event handler
recognitionEngine.OcrProgress += (Aspose.OCR.Models.Events.OcrPageRecognizeEventsArgs e) => {
	Console.WriteLine(e.FileName + " Page " + e.CurrentPage + " image " + e.CurrentImage + " " + e.Duration.TotalSeconds + "s " + e.OperationName);
};
// Recognize images
List<Aspose.OCR.RecognitionResult> results = recognitionEngine.Recognize(input);
Aspose.OCR.AsposeOcr.SaveMultipageDocument("result.json", Aspose.OCR.SaveFormat.Json, results);