Enum OcrOutputFormat
What an OCR program writes, for Output.
public enum OcrOutputFormat
Fields
Alto = 2ALTO.
Auto = 0Tell hOCR from ALTO by the content: an
altoroot element is ALTO, anything else hOCR.Hocr = 1hOCR.
Examples
// Any OCR program that writes hOCR or ALTO is an engine. No shell runs the command, and each run has its own temp folder.
CommandOcrEngine tesseract = new("tesseract {image} {output} -l {langs} --dpi {dpi} hocr", new CommandOcrOptions
{
Languages = ["eng"],
Timeout = TimeSpan.FromMinutes(2),
});
try
{
OcrResult result = await tesseract.RecognizeAsync(new OcrRequest(page), Ct);
Console.WriteLine(result.Text);
}
catch (OcrEngineException e)
{
Console.WriteLine($"{e.Message} {e.ErrorOutput}");
}