OcrInput Class
using IronOcr;
using System;

var ocrTesseract = new IronTesseract();

using var ocrInput = new OcrInput();
ocrInput.LoadImage(@"images\image.png");
var ocrResult = ocrTesseract.Read(ocrInput);
Console.WriteLine(ocrResult.Text);
NuGet Download
PM > Install-Package IronOcr
OcrInput Class

OcrInput Class

Introducing a better code structure with OcrInput which allows more developer control of OCR.

This structure is the building block on which high-performing OCR applications for C# can be built.

Features include automatic or explicit image optimizations, managed safety from memory leaks, multithreading, multipage documents, OCR to PDF, OCR to HTML, and support for OCR PDF and multipage TIFF files.

Below is an example of how to use the OcrInput class effectively. The sample is IronOCR-specific (using IronOcr;) - typically the only thing you need to change is the image path.

Learn to Read Text from Images in C# with IronOCR
View on GitHub

Ready to Get Started?

Nuget Downloads 6,337,990Version:2026.10just released