Extract text from a scan, a photo of a receipt, or a page rendered out of a PDF. Both engines answer the same interface, so switching between them is a registration change and a different set of language data.
The interfaces below are the part that does not change when you swap the library underneath. Each provider then adds whatever extras its own library exposes.
IOcrService takes a file and returns an OcrResult carrying the recognised text. That is the whole surface.
Tesseract takes a language code and a data directory; PaddleOCR takes the language per call. Both handle multilingual documents.
Cropping, deskewing and flattening to grayscale with the Drawing API before the read is usually what moves accuracy, not the engine.
Render pages to images with the PDF module, then read those — the two modules exchange the same file objects.
Install the one that fits your runtime and licensing, and name it once at registration. Every package here is published on nuget.org.
The provider appears where the concrete class is constructed, and nowhere else. Always-current samples live in the package documentation.
// Tesseract runs anywhere; PaddleOCR is the Windows alternative behind the same contract.
var ocr = new Regira.Office.OCR.Tesseract.OcrManager(new OcrManager.Options
{
Language = "en",
DataDirectory = "./tessdata"
});
OcrResult result = await ocr.Read(scan);
string? text = result.Text;Extract text from an uploaded image using Tesseract, with support for multiple languages.
The free tier needs no key and is rate-limited to 5 requests / 60 s. A trial or commercial key removes the limit — send it in the X-License-Key header.
Generate PDFs from HTML, merge and split them, extract text and render pages as images — over DocNET, SelectPdf, Spire, Playwright or PuppeteerSharp.