The C# OCR Library

IronOcr makes it easy to read text from images in your .net apps & websites.

  • # Read text and barcodes from scanned images & PDFs
  • # Supports multiple international languages
  • # Output as plain text or structured data

C# OCR

Image to Text & PDF to Text OCR for Visual Studio

Pass IronOCR single or multi page scanned images to receive all text, barcode, & QR content in return. The OCR library provides a set of classes to add OCR functionality into Web, Desktop or Console .Net Applications. Input formats can include PDF, JPG, PNG, GIF, BMP and TIFF.

The OCR (Optical Character Recognition) engine views pages formatted with multiple popular fonts, weights, italics, and underlines for accurate text reading. Cropping classes further assists OCR to perform at speed and with pinpoint accuracy. Iron’s multithreaded engine accelerates OCR speeds for multi-page documents on multi-core servers.

High Accuracy at High Speed

The OCR (Optical Character Recognition) engine views pages formatted with multiple popular fonts, weights, italics, and underlines for accurate text reading. Cropping classes further assists OCR to perform at speed and with pinpoint accuracy. Iron’s multithreaded engine accelerates OCR speeds for multi-page documents on multi-core servers.

Human Support Directly From Our Development Team

Whether its product, integration or licensing queries, the Iron product development team are on hand to support all of your questions. Get in touch and start a dialog with Iron to make the most of our library in your project.

Because the IronOCR API is well documented and easy learn, most C# coders are up and running in 60 seconds using the Nuget installer for Visual Studio.     Install Now »


C# OCR Results

Advanced Image Pre-processing for Consistent Results Every time

What really makes IronOCR special is its ability to read badly scanned documents. Its unique pre-processing library reduces background noise, rotation, distortion and skewed alignment as well as simplifying colors and enhancing resolution & contrast. Iron’s AutoOCR and Advanced OCR settings provide developers with the tools to achieve the best possible results, every time..


C# OCR Image to Text

Supports for Languages from across the world

IIronOCR covers languages from across the globe. Language packs available for: Arabic, Simplified Chinese, Traditional Chinese, Danish, English, Finnish, French, German, Hebrew, Italian, Japanese, Korean, Portuguese, Russian, Spanish, and Swedish. Other languages can be supported by request.


C# OCR Bitmap to Text

Output content into your project as Structured Data

IronOCR outputs content as plain text and barcode data. An alternative structured data object model allows developers to receive all content in the format of structured Headings, Paragraphs, Lines, Words and Characters for input directly into .Net applications.

Start reading text from images in 60 seconds

How To Install the IronOCR C# OCR Library into Visual Studio

Install IronOCR to your .Net Project

The easiest way to install IronOCR is using NuGet Package Manager for Visual-Studio:

  1. The package name is "IronOCR"
  2. If NuGet is unfamiliar to you… read this tutorial
  3. If you would prefer to download IronOCR as a dll and install manually.

C# OCR Example Code Demo

Get Coding

IronOCR has a very simple API based on HTML as a design language:

using IronOcr;
//..
var Ocr = new AutoOcr();
var Result = Ocr.Read(@"C:\path\to\image.png");
Console.WriteLine(Result.Text);
                                    
Imports IronOcr
Dim Ocr = New AutoOcr()
Dim Result = Ocr.Read("C:\path\to\image.png")
Console.WriteLine(Result.Text)
using IronOcr;
//..
var Ocr = new AdvancedOcr()
{
    CleanBackgroundNoise = true,
    EnhanceContrast = true,
    EnhanceResolution = true,
    Language =  IronOcr.Languages.English.OcrLanguagePack,
    Strategy = IronOcr.AdvancedOcr.OcrStrategy.Advanced,
    ColorSpace = AdvancedOcr.OcrColorSpace.Color,
    DetectWhiteTextOnDarkBackgrounds = true,
    InputImageType = AdvancedOcr.InputTypes.AutoDetect,
    RotateAndStraighten = true,
    ReadBarCodes = true,
    ColorDepth =4
};

var testImage = @"C:\path\to\scan.tiff";

var Results = Ocr.Read(testImage);

var Barcodes = Results.Barcodes.Select(b => b.Value);

Console.WriteLine(Results.Text);
Console.WriteLine("Barcodes:" + String.Join(",", Barcodes));
Imports IronOcr
Dim Ocr = New AdvancedOcr() With { _
     .CleanBackgroundNoise = True, _
     .EnhanceContrast = True, _
     .EnhanceResolution = True, _
     .Language = IronOcr.Languages.English.OcrLanguagePack, _
     .Strategy = IronOcr.AdvancedOcr.OcrStrategy.Advanced, _
     .ColorSpace = AdvancedOcr.OcrColorSpace.Color, _
     .DetectWhiteTextOnDarkBackgrounds = True, _
     .InputImageType = AdvancedOcr.InputTypes.AutoDetect, _
     .RotateAndStraighten = True, _
     .ReadBarCodes = True, _
     .ColorDepth = 4 _
}

Dim testImage = "C:\path\to\scan.tiff"

Dim Results = Ocr.Read(testImage)



Console.WriteLine(Results.Text)
 
var Ocr = new IronOcr.AutoOcr();
var Results = Ocr.ReadPdf(@"C:\Users\Me\Desktop\Invoice.pdf");


var Barcodes = Results.Barcodes;
var Text = Results.Text;
Console.WriteLine(Text);

Dim Ocr = New IronOcr.AutoOcr()
Dim Results = Ocr.ReadPdf("C:\Users\Me\Desktop\Invoice.pdf")
 
using IronOcr;

var Ocr = new AdvancedOcr()
{
    CleanBackgroundNoise = false,
    ColorDepth = 4,
    ColorSpace = AdvancedOcr.OcrColorSpace.Color,
    EnhanceContrast = false,
    DetectWhiteTextOnDarkBackgrounds = false,
    RotateAndStraighten = false,
    Language = IronOcr.Languages.English.OcrLanguagePack,
    EnhanceResolution = false,
    InputImageType = AdvancedOcr.InputTypes.Document,
    ReadBarCodes = true,
    Strategy = AdvancedOcr.OcrStrategy.Fast
};

var Results = Ocr.ReadPdf(@"C:\Users\Me\Desktop\Invoice.pdf");
var Pages = Results.Pages;
var Barcodes = Results.Barcodes;
var FullPdfText = Results.Text;

Imports IronOcr


Dim Ocr = New AdvancedOcr() With { _
  .CleanBackgroundNoise = False, _
  .ColorDepth = 4, _
  .ColorSpace = AdvancedOcr.OcrColorSpace.Color, _
  .EnhanceContrast = False, _
  .DetectWhiteTextOnDarkBackgrounds = False, _
  .RotateAndStraighten = False, _
  .Language = IronOcr.Languages.English.OcrLanguagePack, _
  .EnhanceResolution = False, _
  .InputImageType = AdvancedOcr.InputTypes.Document, _
  .ReadBarCodes = True, _
  .Strategy = AdvancedOcr.OcrStrategy.Fast _
}

Dim Results = Ocr.ReadPdf("C:\Users\Me\Desktop\Invoice.pdf")
Dim Pages = Results.Pages
Dim Barcodes = Results.Barcodes
Dim FullPdfText = Results.Text



How To Install the IronOCR C# OCR Library into Visual Studio

Add Additional Language Packs

English is installed as standard.   Additional OCR Languages packs are available for download:

  • IronOcr.Languages.Arabic Language Pack : Dll | NuGet
  • IronOcr.Languages.ChineseSimplified Language Pack : Dll | NuGet
  • IronOcr.Languages.ChineseTraditional Language Pack : Dll | NuGet
  • IronOcr.Languages.Danish Language Pack : Dll | NuGet
  • IronOcr.Languages.Finnish Language Pack : Dll | NuGet
  • IronOcr.Languages.French Language Pack : Dll | NuGet
  • IronOcr.Languages.German Language Pack : Dll | NuGet
  • IronOcr.Languages.Hebrew Language Pack : Dll | NuGet
  • IronOcr.Languages.Italian Language Pack : Dll | NuGet
  • IronOcr.Languages.Japanese Language Pack : Dll | NuGet
  • IronOcr.Languages.Korean Language Pack : Dll | NuGet
  • IronOcr.Languages.Norwegian Language Pack : Dll | NuGet
  • IronOcr.Languages.Portuguese Language Pack : Dll | NuGet
  • IronOcr.Languages.Russian Language Pack : Dll | NuGet
  • IronOcr.Languages.Spanish Language Pack : Dll | NuGet
  • IronOcr.Languages.Swedish Language Pack : Dll | NuGet

Reliable Ocr tools for C# developers

C# OCR Documentation

Well Documented

Clear online manuals in plain English.

C# & VB Docs
C# OCR Library Licensing

Flexibly Licensed

Free Development. Commercial from $399.

Explore Licenses
C# PDF Open-Source Examples

Human Support

Talk directly with our development team

Ask a Question
visual studio Install C# PDF Generator by IronPdf

1 Minute Setup

Use Nuget Package Manager to install in under 60 seconds.