Browse our Products

Aspose.OCR for .NET 25.4.0 - Release Notes

What was changed

KeySummaryCategory
OCRNET‑1006, OCRNET‑1012Add markdown output format with document layout.New feature
OCRNET‑1010, OCRNET‑1011Automatic language detection during recognition.New feature
OCRNET‑1009Docx output format improvements.Enhancement

Public API changes and backwards compatibility

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

Added public APIs:

The following public APIs have been introduced in this release:

Aspose.OCR.LanguageDetectionLevel enumeration

Defines the level of language detection for text recognition in an image:

LevelValueDescription
ByPageAspose.OCR.LanguageDetectionLevel.ByPageDetects a single language for the entire image.
ByParagraphAspose.OCR.LanguageDetectionLevel.ByParagraphDetects the language separately for each paragraph.
ByWordAspose.OCR.LanguageDetectionLevel.ByWordDetects the language separately for each word.

Updated public APIs:

The following public APIs have been updated in Aspose.OCR for .NET 25.4.0 release:

Aspose.OCR.Language

Aspose.OCR for .NET can now Automatically detects the language in the input document or image. Use the following language identifier in recognition settings:

  • Aspose.OCR.Language.Multilanguage
  • Aspose.OCR.Language.Auto
  • Aspose.OCR.Language.Universal

Aspose.OCR.SaveFormat

Aspose.OCR for .NET can now save the document as a Markdown (.md) file. If Aspose.OCR.DetectAreasMode.MULTICOLUMN is used, images will also be extracted.

  • Aspose.OCR.SaveFormat.Md

Removed public APIs:

No changes.

Examples

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

Detect language and recognize mixed-language image. Save result as markdown files.

Aspose.OCR.AsposeOcr recognitionEngine = new Aspose.OCR.AsposeOcr();
// Add an image to OcrInput object
Aspose.OCR.OcrInput input = new Aspose.OCR.OcrInput(Aspose.OCR.InputType.SingleImage);
input.Add("source.png");

// Recognize image
Aspose.OCR.OcrOutput recognResult = recognitionEngine.Recognize(input, new RecognitionSettings 
		{ 
            Language = Aspose.OCR.Language.Auto,
			LanguageDetectionLevel = Aspose.OCR.LanguageDetectionLevel.ByParagraph
        });

// Export recognition result in Markdown format.
recognResult.Save("result.md", Aspose.OCR.SaveFormat.Md);