What’s new in this release
- [Improvement] Add support for Chinese and Japanese languages when using OCR (PARSERNET‑2833)
- A new
Languagesclass has been introduced in theGroupDocs.Parser.Optionsnamespace. GroupDocs.Parser.Options.OcrOptionsnow includes aLanguages Languagesproperty that lets you specify the OCR language set.
- A new
These updates enable you to run text recognition on documents that contain Chinese or Japanese characters directly through the parser API.
Usage example
// Create an instance of Parser class
using (Parser parser = new Parser(documentPath))
{
OcrOptions ocrOptions = new OcrOptions()
{
Language = Language.Jpn // Set OCR language to Japanese
};
TextOptions options = new TextOptions(false, true, ocrOptions);
TextReader result = parser.GetText(options);
string text = result.ReadToEnd();
Console.WriteLine(text);
}
The same approach works for Chinese by setting Language = Language.Chn (or the appropriate enum value defined in Languages).
Fixes and enhancements
No bug fixes or additional enhancements are included in this 26.2 release.
How to get the update
-
NuGet – Upgrade to the latest GroupDocs.Parser package via NuGet:
Install-Package GroupDocs.Parser -Version 26.2(or
dotnet add package GroupDocs.Parser --version 26.2for .NET CLI) -
Direct Download – Download the assemblies for .NET from the GroupDocs.Parser for .NET 26.2 page on the GroupDocs releases site.