Additional OCR Language Packs

IronOCR supports 125 international languages, but only English is installed within IronOCR as standard.

Additional Language packs may be easily added to your C#, VB or ASP .NET project via NuGet or as Dlls which can be downloaded and added as project references.



Code Examples

International Language Example

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

using IronOcr;

IronTesseract ocr = new IronTesseract();
ocr.Language = OcrLanguage.ChineseSimplified;

using (var input = new OcrInput())
{
    input.AddImage("img/chinese.gif");

    // Add image filters if needed
    // Input.Deskew();
    // Input.DeNoise();

    OcrResult result = ocr.Read(input);

    string TestResult = result.Text;

    // Console can't print unicode. Save to disk instead.
    result.SaveAsTextFile("chinese.txt");
}
//PM> Install-Package IronOcr.Languages.ChineseSimplified

using IronOcr;

IronTesseract ocr = new IronTesseract();
ocr.Language = OcrLanguage.ChineseSimplified;

using (var input = new OcrInput())
{
    input.AddImage("img/chinese.gif");

    // Add image filters if needed
    // Input.Deskew();
    // Input.DeNoise();

    OcrResult result = ocr.Read(input);

    string TestResult = result.Text;

    // Console can't print unicode. Save to disk instead.
    result.SaveAsTextFile("chinese.txt");
}
'PM> Install-Package IronOcr.Languages.ChineseSimplified

Imports IronOcr

Private ocr As New IronTesseract()
ocr.Language = OcrLanguage.ChineseSimplified

Using input = New OcrInput()
	input.AddImage("img/chinese.gif")

	' Add image filters if needed
	' Input.Deskew();
	' Input.DeNoise();

	Dim result As OcrResult = ocr.Read(input)

	Dim TestResult As String = result.Text

	' Console can't print unicode. Save to disk instead.
	result.SaveAsTextFile("chinese.txt")
End Using
VB   C#

Vertically Written Language Example

Dictionaries tuned for vertically written language. Use 'Vertical' Variant of Korean and Japan OcrLanguage.

using IronOcr;

IronTesseract ocr = new IronTesseract();
ocr.Language = OcrLanguage.JapaneseVertical;

using (var input = new OcrInput(@"images\image.png"))
{
    OcrResult result = ocr.Read(input);
    Console.WriteLine(result.Text);
}
using IronOcr;

IronTesseract ocr = new IronTesseract();
ocr.Language = OcrLanguage.JapaneseVertical;

using (var input = new OcrInput(@"images\image.png"))
{
    OcrResult result = ocr.Read(input);
    Console.WriteLine(result.Text);
}
Imports IronOcr

Private ocr As New IronTesseract()
ocr.Language = OcrLanguage.JapaneseVertical

Using input = New OcrInput("images\image.png")
	Dim result As OcrResult = ocr.Read(input)
	Console.WriteLine(result.Text)
End Using
VB   C#

Custom Language Example

For using any Tesseract .Traineddata language file you have downloaded or trained yourself

using IronOcr;

IronTesseract ocr = new IronTesseract();

ocr.UseCustomTesseractLanguageFile("custom_tesseract_files/custom.traineddata");

using (var input = new OcrInput(@"images\image.png"))
{
    OcrResult result = ocr.Read(input);
    Console.WriteLine(result.Text);
}
using IronOcr;

IronTesseract ocr = new IronTesseract();

ocr.UseCustomTesseractLanguageFile("custom_tesseract_files/custom.traineddata");

using (var input = new OcrInput(@"images\image.png"))
{
    OcrResult result = ocr.Read(input);
    Console.WriteLine(result.Text);
}
Imports IronOcr

Private ocr As New IronTesseract()

ocr.UseCustomTesseractLanguageFile("custom_tesseract_files/custom.traineddata")

Using input = New OcrInput("images\image.png")
	Dim result As OcrResult = ocr.Read(input)
	Console.WriteLine(result.Text)
End Using
VB   C#

Multiple Language Example

More than one Language at a time.

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

IronTesseract ocr = new IronTesseract();

ocr.Language = OcrLanguage.English;
ocr.AddSecondaryLanguage(OcrLanguage.Arabic);
// Add any number of languages

using (var input = new OcrInput(@"images\multi-lang.pdf"))
{
    var Result = ocr.Read(input);
    Console.WriteLine(Result.Text);
}
//PM> Install-Package IronOcr.Languages.Arabic
using IronOcr;

IronTesseract ocr = new IronTesseract();

ocr.Language = OcrLanguage.English;
ocr.AddSecondaryLanguage(OcrLanguage.Arabic);
// Add any number of languages

using (var input = new OcrInput(@"images\multi-lang.pdf"))
{
    var Result = ocr.Read(input);
    Console.WriteLine(Result.Text);
}
'PM> Install-Package IronOcr.Languages.Arabic
Imports IronOcr

Private ocr As New IronTesseract()

ocr.Language = OcrLanguage.English
ocr.AddSecondaryLanguage(OcrLanguage.Arabic)
' Add any number of languages

Using input = New OcrInput("images\multi-lang.pdf")
	Dim Result = ocr.Read(input)
	Console.WriteLine(Result.Text)
End Using
VB   C#

Faster Language Example

Dictionaries Tuned for Speed. Use 'Fast' Variant of any OcrLanguage.

using IronOcr;

IronTesseract ocr = new IronTesseract();
ocr.Language = OcrLanguage.EnglishFast;

using (var input = new OcrInput(@"images\image.png"))
{
    OcrResult result = ocr.Read(input);
    Console.WriteLine(result.Text);
}
using IronOcr;

IronTesseract ocr = new IronTesseract();
ocr.Language = OcrLanguage.EnglishFast;

using (var input = new OcrInput(@"images\image.png"))
{
    OcrResult result = ocr.Read(input);
    Console.WriteLine(result.Text);
}
Imports IronOcr

Private ocr As New IronTesseract()
ocr.Language = OcrLanguage.EnglishFast

Using input = New OcrInput("images\image.png")
	Dim result As OcrResult = ocr.Read(input)
	Console.WriteLine(result.Text)
End Using
VB   C#

Higher Accuracy Detail Language Example

Dictionaries tuned for accuracy but much slower results. Use 'Best' Variant of any OcrLanguage.


//PM> Install-Package IronOcr.Languages.French
using IronOcr;

IronTesseract ocr = new IronTesseract();
ocr.Language = OcrLanguage.FrenchBest;

using (var input = new OcrInput(@"images\image.png"))
{
    OcrResult result = ocr.Read(input);
    Console.WriteLine(result.Text);
}

//PM> Install-Package IronOcr.Languages.French
using IronOcr;

IronTesseract ocr = new IronTesseract();
ocr.Language = OcrLanguage.FrenchBest;

using (var input = new OcrInput(@"images\image.png"))
{
    OcrResult result = ocr.Read(input);
    Console.WriteLine(result.Text);
}
'PM> Install-Package IronOcr.Languages.French
Imports IronOcr

Private ocr As New IronTesseract()
ocr.Language = OcrLanguage.FrenchBest

Using input = New OcrInput("images\image.png")
	Dim result As OcrResult = ocr.Read(input)
	Console.WriteLine(result.Text)
End Using
VB   C#

How To Install OCR Language Packs

Additional OCR Languages packs are available for download below. Either

  • Install the NuGet package. Search NuGet for IronOcr Languages.
  • Or download the "ocrdata" file and add it to your .NET project in any folder you like. Set CopyToOutputDirectory = CopyIfNewer

Download OCR Language Packs

Help

If the language you are looking to read is not available in the list above please get in touch with us. Many other languages are available on request.

Priority on production resources are given to IronOCR licensees so please also consider licensing IronOCR for access to your desired language pack.