IRONSOFTWAREHOME

OCR Results

Get more than just text. Our API provides structured data including coordinates, confidence scores, and a full document hierarchy (pages, lines, words).

Data Output

1

Texts

IronOCR returns the text output for paragraphs, lines, words, and characters as structured objects and strings, enabling developers to access and manipulate the data quickly.

using IronOcr;

var ocrTesseract = new IronTesseract();
using var ocrInput = new OcrInput();
var pages = new int[] { 1, 2 };
ocrInput.LoadImageFrames("example.tiff", pages);
OcrResult ocrResult = ocrTesseract.Read(ocrInput);
foreach (var page in ocrResult.Pages)
{
    // Page text
    string PageText = page.Text;
}
2

OCR Texts Location

Get the precise X/Y coordinates and bounding box dimensions for every paragraph, line, word, and character, enabling text highlighting, zonal OCR, and data validation.

Learn how to:Extract Read Results in .NET C#
using IronOcr;
using IronOcr.OcrResult;

// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();

// Add image
using var imageInput = new OcrImageInput("sample.jpg");

// Perform OCR
OcrResult ocrResult = ocrTesseract.Read(imageInput);

// Retrieve list of detected paragraphs
Paragraph[] paragraphs = ocrResult.Paragraphs;

// Output Text location (X,Y) of the first paragraph
Console.WriteLine($"X: {paragraphs[0].X}");
Console.WriteLine($"Y: {paragraphs[0].Y}");
3

OCR Output confidence

Receive a confidence score for texts extracted. Programmatically flag low-confidence results for human review to build more reliable automation workflows.

Learn how to:Get Read Confidence in .NET C#
using IronOcr;

var ocrTesseract = new IronTesseract();
using var ocrInput = new OcrInput();

// Load image from file
ocrInput.LoadImage("sameple.png");

// Perform OCR
OcrResult ocrResult = ocrTesseract.Read(ocrInput);

// Check Confidence level
Console.WriteLine($"Confidence: {ocrResult.Confidence}%");
4

Images of OCR Elements

In addition to text, export visual elements of texts detected from OCR from the input document as separate image files, useful for archiving or processing non-textual data.

Learn how to:Extract Read Results in .NET C#
using IronOcr;
using IronSoftware.Drawing;

var ocrTesseract = new IronTesseract();
using var ocrInput = new OcrInput();
ocrInput.LoadImage("sample.png");
var ocrResult = ocrTesseract.Read(ocrInput);
foreach (var page in ocrResult.Pages)
{
    foreach (var word in page.Words)
    {
        word.ToBitmap(ocrInput).SaveAs($"page{page.PageNumber}_word{word.WordNumber}.png", AnyBitmap.ImageFormat.Png);
    }
}

Output Types

1

Text

Access the OCR results through a structured, hierarchical API. Easily navigate from large paragraphs down to individual characters, giving you granular control over the extracted text and its metadata.

Learn how to:Extract Read Results in .NET C#
using IronOcr;

// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();

// Add image
using var imageInput = new OcrImageInput("sample.jpg");

// Perform OCR
OcrResult ocrResult = ocrTesseract.Read(imageInput);

// Output the first detected paragraph text
Console.WriteLine($"Text: {ocrResult.Paragraphs[0].Text}");
2

Searchable PDFs

Convert any scanned document or image into a fully searchable PDF file. The original layout is preserved, but all text becomes selectable, copyable, and discoverable.

Learn how to:Save Results as a Searchable PDF
using IronOcr;

// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();

// Enable render as searchable PDF
ocrTesseract.Configuration.RenderSearchablePdf = true;

// Add image
using var imageInput = new OcrImageInput("sample.tiff");

// Perform OCR
OcrResult ocrResult = ocrTesseract.Read(imageInput);

// Export as searchable PDF
ocrResult.SaveAsSearchablePdf("searchablePdf.pdf");
3

hOCR

Export results in the hOCR format, an HTML-based standard that provides rich metadata, including text, layout information, and coordinates for each word, ideal for advanced document analysis.

Learn how to:Save Results as hOCR in an HTML File
using IronOcr;

// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();

// Enable render as hOCR
ocrTesseract.Configuration.RenderHocr = true;

// Add image
using var imageInput = new OcrImageInput("sample.tiff");
imageInput.Title = "Html Title";

// Perform OCR
OcrResult ocrResult = ocrTesseract.Read(imageInput);

// Export as HTML
ocrResult.SaveAsHocrFile("result.html");
4

Highlight Texts as Images

For debugging and verification, generate an image of the original document with all recognized text highlighted. This provides a quick visual check of the OCR engine's accuracy and text location.

Learn how to:C# Highlight Texts for Debugging
using IronOcr;

IronTesseract ocrTesseract = new IronTesseract();
using var ocrInput = new OcrInput();
ocrInput.LoadPdf("sample.pdf");
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract, "highlight_page_", ResultHighlightType.Paragraph);
5

Barcode and QR Code Values

Extract the decoded string values from any barcodes or QR codes found within the document. The API provides this data alongside the text results for a complete data capture solution.

Learn how to:Extract Read Results in .NET C#
using IronOcr;
using IronOcr.OcrResult;

// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();

// Enable barcodes detection
ocrTesseract.Configuration.ReadBarCodes = true;

// Load PDF file
using OcrInput ocrInput = new OcrInput();
ocrInput.LoadPdf("sample.pdf");

// Perform OCR
OcrResult ocrResult = ocrTesseract.Read(ocrInput);

// Output Barcode value
Console.WriteLine(ocrResult.Barcodes[0].Value);

Ready to Get Started?

Nuget Downloads 6,236,385Version:2026.9just released

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required