DEV Community

IronSoftware
IronSoftware

Posted on • Originally published at ironsoftware.com

125 International OCR Languages

IronOCR supports 125 international languages.

Other than English which is installed by default, language packs may be added to your .NET project via Nuget or as downloads from our Languages Page.

Most Languages are available in Fast, Standard (recommended) and Best quality. Best may be more accurate, but also is slower.

C#:

//PM> Install-Package IronOcr.Languages.Arabic

using IronOcr;

var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Arabic;

using (var Input = new OcrInput(@"images\arabic.gif"))
{
    var Result = Ocr.Read(Input);
    Console.WriteLine(Result.Text);
}


///A more advanced Example

var Ocr2 = new IronTesseract();
Ocr2.UseCustomTesseractLanguageFile("custom_tesseract_files/custom.traineddata");
Ocr2.AddSecondaryLanguage(OcrLanguage.EnglishBest);

using (var Input = new OcrInput(@"images\mixed-lang.pdf"))
{
    var Result = Ocr2.Read(Input);
    Console.WriteLine(Result.Text);
}
Enter fullscreen mode Exit fullscreen mode

VB:

'PM> Install-Package IronOcr.Languages.Arabic

Imports IronOcr

Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Arabic

Using Input = New OcrInput("images\arabic.gif")
    Dim Result = Ocr.Read(Input)
    Console.WriteLine(Result.Text)
End Using


'''A more advanced Example

Dim Ocr2 = New IronTesseract()
Ocr2.UseCustomTesseractLanguageFile("custom_tesseract_files/custom.traineddata")
Ocr2.AddSecondaryLanguage(OcrLanguage.EnglishBest)

Using Input = New OcrInput("images\mixed-lang.pdf")
    Dim Result = Ocr2.Read(Input)
    Console.WriteLine(Result.Text)
End Using
Enter fullscreen mode Exit fullscreen mode

Top comments (0)