Upgrade your C# apps with the latest Aspose.OCR for .NET 24.4.0 (MSI) release! This update empowers developers with new features and enhancements to simplify Optical Character Recognition (OCR) processes.
Arabic Text Recognition
Developers can leverage the ability to recognize Arabic text within images or scanned documents with this API update, including mixed Arabic/English content. The following code sample highlights the feature usage.
// Initialize Aspose.OCR for .NET recognition API
Aspose.OCR.AsposeOcr recognitionEngine = new Aspose.OCR.AsposeOcr();
// Add image
Aspose.OCR.OcrInput input = new Aspose.OCR.OcrInput(Aspose.OCR.InputType.SingleImage);
input.Add("source.png");
// Set recognition language
Aspose.OCR.RecognitionSettings recognitionSettings = new Aspose.OCR.RecognitionSettings();
recognitionSettings.Language = Aspose.OCR.Language.Ara;
// Recognize image
List<Aspose.OCR.RecognitionResult> results = recognitionEngine.Recognize(input, recognitionSettings);
Console.WriteLine(results[0].RecognitionText);
Source*
Process Cancellation
With the latest C# OCR API release, you can control lengthy OCR operations with more precision. The Recognize
method now accepts a CancellationToken
parameter, enabling you to stop the process manually or set an automatic timeout. This code example illustrates how to use this feature within your C# apps.
// Set automatic cancellation after 20 seconds (20,000ms)
CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
cancellationTokenSource.CancelAfter(20000);
// Initialize Aspose.OCR for .NET recognition API
Aspose.OCR.AsposeOcr recognitionEngine = new Aspose.OCR.AsposeOcr();
// Add scanned PDF to recognition batch
Aspose.OCR.OcrInput input = new Aspose.OCR.OcrInput(Aspose.OCR.InputType.PDF);
input.Add("large.pdf");
// Recognize image
List<Aspose.OCR.RecognitionResult> results = recognitionEngine.Recognize(input, null, cancellationTokenSource.Token);
Source*
Backward Compatibility
The existing code developed using earlier Aspose.OCR for .NET versions will continue to work flawlessly with version 24.4.0.
Deprecated Language Codes
We have aligned the Language codes with the ISO 639-2 standard. While legacy values remain functional for now, they are planned for removal in version 25.1.0 (January 2025). We recommend transitioning to the new codes for future-proof development.
You can view the list of all new features, enhancements, and bug fixes introduced in this release by visiting Aspose.OCR for .NET 24.4.0 Release Notes.