Tesseract Detailed Configuration
The IronTesseract.Configuration object provides access to the underlying Tesseract API in C# / .NET to configure setup for advanced users.
var Ocr = new IronTesseract(); Ocr.Language = OcrLanguage.English; Ocr.Configuration.ReadBarCodes = false; Ocr.Configuration.TesseractVersion = TesseractVersion.Tesseract5; Ocr.Configuration.EngineMode = TesseractEngineMode.TesseractAndLstm; Ocr.Configuration.BlackListCharacters = "`ë|^"; Ocr.Configuration.RenderSearchablePdfsAndHocr = true; Ocr.Configuration.PageSegmentationMode = TesseractPageSegmentationMode.AutoOsd; Ocr.Configuration.TesseractVariables["tessedit_parallelize"] = false; using (var Input = new OcrInput(@"images\image.png")) { var Result = Ocr.Read(Input); Console.WriteLine(Result.Text); }
Dim Ocr = New IronTesseract() Ocr.Language = OcrLanguage.English Ocr.Configuration.ReadBarCodes = False Ocr.Configuration.TesseractVersion = TesseractVersion.Tesseract5 Ocr.Configuration.EngineMode = TesseractEngineMode.TesseractAndLstm Ocr.Configuration.BlackListCharacters = "`ë|^" Ocr.Configuration.RenderSearchablePdfsAndHocr = True Ocr.Configuration.PageSegmentationMode = TesseractPageSegmentationMode.AutoOsd Ocr.Configuration.TesseractVariables("tessedit_parallelize") = False Using Input = New OcrInput("images\image.png") Dim Result = Ocr.Read(Input) Console.WriteLine(Result.Text) End Using
The IronTesseract.Configuration object provides access to the underlying Tesseract API in C# / .NET to configure setup for advanced users.