IRONSOFTWARE
  • PRODUCTS
  • OPEN SOURCE
  • ABOUT US
  • CONTACT US
205 N. Michigan Ave. Chicago, IL 60611, USA
+1 (312) 500-3060
Join Iron Slack

Our Company

  • About Us 
  • Company News 
  • Customers 
  • Environmental Commitments 
  • Beta Program 
  • Year in Review: 2022 

Sales Partners

  • Global Resellers 

Contact Us

  • Live Chat 
  • Send an Email 
+1 (312) 500-3060
205 N. Michigan Ave.
Chicago, IL 60611, USA

Careers at Iron

Join our teamJoin our team
We're hiring
ironpdf_logo
ironpdf_logo
for
Create, read, and edit PDFs
ironocr_logo
ironocr_logo
for
Image to text in 127 languages
ironxl_logo
ironxl_logo
for
Edit Excel & CSV Files.
No Office Interop required
ironzip_logo
ironzip_logo
for
Zip and unzip archives
ironqr_logo
ironqr_logo
for
Read & write QR codes with ML detection
ironbarcode_logo
ironbarcode_logo
for
Read and write Barcodes
ironwebscraper_logo
ironwebscraper_logo
for
Extract structured data from websites
7 for the Price of 2 Full Suite of products from $1498 Save 70% with Iron Suite
Iron Suites - Donate $50
irondrawing_logo
irondrawing_logo
for
System.Drawing.Common Replacement
ironfreetools_logo
ironfreetools_logo
Free Software Development Tools
IronOCR - OCR Library for C# .NET
  • Home
  • Licensing
    • Licensing
    • EULA
    • Support & Update Extensions
    • License Upgrades
    • Start Free Trial
  • Features
  • Docs
    • Get Started
    • Demos
    • Languages
    • Code Examples
    • Tutorials
    • How-Tos
    • Troubleshooting
    • Product Updates
    • API Reference  
Search
Ctrl
K
Free NuGet DownloadTotal downloads: 1,236,982 Start for FreeTotal downloads: 1,236,982
IronOCR - OCR Library for C# .NET
for
.NET
  • IRONSOFTWARE HOME
  • PRODUCTS
    • IRONSUITE

    • IRONPDF
      UPDATED
    • IRONOCR
    • IRONXL
    • IRONZIP
    • IRONQR
    • IRONBARCODE
    • IRONWEBSCRAPER
  • OPEN SOURCE
    • IRONDRAWING
    • IRONFREETOOLS
  • ABOUT US
    • About US
    • Company News
    • Environmental Commitments
    • Beta Program
    • Year in Review: 2022
    • Live Chat
    • Global Resellers
    • Join our team
  • CONTACT US
  • HOME
  • LICENSING
    • Licensing
    • EULA
    • Support & Update Extensions
    • License Upgrades

    • Start Free Trial
  • FEATURES
  • DOCS
    • Get Started
    • Demos
    • Languages
    • Code Examples
    • Tutorials
    • How-Tos
    • Troubleshooting
    • Product Updates

    • API Reference  
Message's icon

VB.NET OCR

  1. Alternative to an Open Source OCR Library
  2. Read text from image in VB.NET
  3. Documentation examples for C#
Free NuGet Download Total downloads: 1,236,982 Start for Free Total downloads: 1,236,982 Free 30-Day Trial Key Total downloads: 1,236,982
Start for Free Total downloads: 1,236,982

Or download the DLL directly here

Examples

  • OCR in 1 line of code
  • PDF OCR Text Extraction
  • OCR with Barcode & QR Reading
  • 125 International OCR Languages
  • Fixing Low Quality Scans & Images
  • Fast OCR Configuration
  • OCR Image Optimization Filters
  • OcrResult Class
  • Create Searchable PDFs by OCR
  • Tesseract 5 for .NET
See All 24 Code Examples
OCR in 1 line of code See All 24 Code Examples
using IronOcr;

string imageText = new IronTesseract().Read(@"images\image.png").Text;
Install-Package IronOcr
PDF OCR Text Extraction See All 24 Code Examples
using IronOcr;
using System;

var ocrTesseract = new IronTesseract();

using var ocrInput = new OcrInput();
// OCR entire document
ocrInput.AddPdf("example.pdf", "password");

// Alternatively OCR selected page numbers
ocrInput.AddPdfPages("example.pdf", new[] { 1, 2, 3 }, "password");

var ocrResult = ocrTesseract.Read(ocrInput);
Console.WriteLine(ocrResult.Text);
Install-Package IronOcr
OCR with Barcode & QR Reading See All 24 Code Examples
using IronOcr;
using System;

var ocrTesseract = new IronTesseract();
ocrTesseract.Configuration.ReadBarCodes = true;
using var ocrInput = new OcrInput();
ocrInput.AddImage(@"images\imageWithBarcode.png");
var ocrResult = ocrTesseract.Read(ocrInput);
foreach (var barcode in ocrResult.Barcodes)
{
    Console.WriteLine(barcode.Value);
}
Install-Package IronOcr
125 International OCR Languages See All 24 Code Examples
using IronOcr;
using System;

var ocrTesseract = new IronTesseract();

ocrTesseract.Language = OcrLanguage.Arabic;

using (var ocrInput = new OcrInput())
{
    ocrInput.AddImage(@"images\arabic.gif");
    var ocrResult = ocrTesseract.Read(ocrInput);
    Console.WriteLine(ocrResult.Text);
}

// Example with a Custom Trained Font Being used:

var ocrTesseractCustomerLang = new IronTesseract();
ocrTesseractCustomerLang.UseCustomTesseractLanguageFile("custom_tesseract_files/custom.traineddata");
ocrTesseractCustomerLang.AddSecondaryLanguage(OcrLanguage.EnglishBest);

using (var ocrInput = new OcrInput())
{
    ocrInput.AddPdf(@"images\mixed-lang.pdf");
    var ocrResult = ocrTesseractCustomerLang.Read(ocrInput);
    Console.WriteLine(ocrResult.Text);
}
Install-Package IronOcr
Fixing Low Quality Scans & Images See All 24 Code Examples
using IronOcr;
using System;

var ocrTesseract = new IronTesseract();
using var ocrInput = new OcrInput();
ocrInput.AddImage(@"images\image.png");

ocrInput.Deskew();
ocrInput.DeNoise();
ocrInput.Despeckle();
ocrInput.EnhanceResolution(225);
ocrInput.Sharpen();
ocrInput.Erode();
ocrInput.Dilate();
ocrInput.Scale(200);
var ocrResult = ocrTesseract.Read(ocrInput);
Console.WriteLine(ocrResult.Text);
Install-Package IronOcr
Fast OCR Configuration See All 24 Code Examples
using IronOcr;
using System;

var ocrTesseract = new IronTesseract();

// Fast Dictionary
ocrTesseract.Language = OcrLanguage.EnglishFast;

// Turn off unneeded options
ocrTesseract.Configuration.ReadBarCodes = false;
ocrTesseract.Configuration.RenderSearchablePdfsAndHocr = false;

// Assume text is laid out neatly in an orthogonal document
ocrTesseract.Configuration.PageSegmentationMode = TesseractPageSegmentationMode.Auto;

using var ocrInput = new OcrInput();
ocrInput.AddImage(@"images\image.png");

var ocrResult = ocrTesseract.Read(ocrInput);
Console.WriteLine(ocrResult.Text);
Install-Package IronOcr
OCR Image Optimization Filters See All 24 Code Examples
using IronOcr;
using System;

var ocrTesseract = new IronTesseract();
using var ocrInput = new OcrInput();
// First load all image(s)
ocrInput.AddImage(@"images\image.png");

// Note: You don't need all of them; most users only need Deskew() and occasionally DeNoise()
ocrInput.WithTitle("My Document");
ocrInput.Binarize();
ocrInput.Contrast();
ocrInput.Deskew();
ocrInput.DeNoise();
ocrInput.Despeckle();
ocrInput.Dilate();
ocrInput.EnhanceResolution(300);
ocrInput.Invert();
ocrInput.Rotate(90);
ocrInput.Scale(150);
ocrInput.Sharpen();
ocrInput.ToGrayScale();
ocrInput.Erode();

// WIZARD - If you are unsure use the debug-wizard to test all combinations:
string codeToRun = OcrInputFilterWizard.Run(@"images\image.png", out double confidence, ocrTesseract);
Console.WriteLine(codeToRun);

// Optional: Export modified images so you can view them.
foreach (var page in ocrInput.GetPages())
{
    page.SaveAsImage($"filtered_{page.Index}.bmp");
}

var ocrResult = ocrTesseract.Read(ocrInput);
Console.WriteLine(ocrResult.Text);
Install-Package IronOcr
OcrResult Class See All 24 Code Examples
using IronOcr;
using IronSoftware.Drawing;

// We can delve deep into OCR results as an object model of
// Pages, Barcodes, Paragraphs, Lines, Words and Characters
// This allows us to explore, export and draw OCR content using other APIs/
var ocrTesseract = new IronTesseract();

ocrTesseract.Configuration.ReadBarCodes = true;

using var ocrInput = new OcrInput();
ocrInput.AddMultiFrameTiff("example.tiff");

OcrResult ocrResult = ocrTesseract.Read(ocrInput);
foreach (var page in ocrResult.Pages)
{
    // Page object
    int PageNumber = page.PageNumber;
    string PageText = page.Text;
    int PageWordCount = page.WordCount;
    // null if we dont set Ocr.Configuration.ReadBarCodes = true;
    OcrResult.Barcode[] Barcodes = page.Barcodes;
    AnyBitmap PageImage = page.ToBitmap(ocrInput);
    int PageWidth = page.Width;
    int PageHeight = page.Height;
    double PageRotation = page.Rotation; // angular correction in degrees from OcrInput.Deskew()

    foreach (var paragraph in page.Paragraphs)
    {
        // Pages -> Paragraphs
        int ParagraphNumber = paragraph.ParagraphNumber;
        string ParagraphText = paragraph.Text;
        AnyBitmap ParagraphImage = paragraph.ToBitmap(ocrInput);
        int ParagraphX_location = paragraph.X;
        int ParagraphY_location = paragraph.Y;
        int ParagraphWidth = paragraph.Width;
        int ParagraphHeight = paragraph.Height;
        double ParagraphOcrAccuracy = paragraph.Confidence;
        OcrResult.TextFlow paragrapthText_direction = paragraph.TextDirection;
        foreach (var line in paragraph.Lines)
        {
            // Pages -> Paragraphs -> Lines
            int LineNumber = line.LineNumber;
            string LineText = line.Text;
            AnyBitmap LineImage = line.ToBitmap(ocrInput);
            int LineX_location = line.X;
            int LineY_location = line.Y;
            int LineWidth = line.Width;
            int LineHeight = line.Height;
            double LineOcrAccuracy = line.Confidence;
            double LineSkew = line.BaselineAngle;
            double LineOffset = line.BaselineOffset;
            foreach (var word in line.Words)
            {
                // Pages -> Paragraphs -> Lines -> Words
                int WordNumber = word.WordNumber;
                string WordText = word.Text;
                AnyBitmap WordImage = word.ToBitmap(ocrInput);
                int WordX_location = word.X;
                int WordY_location = word.Y;
                int WordWidth = word.Width;
                int WordHeight = word.Height;
                double WordOcrAccuracy = word.Confidence;
                foreach (var character in word.Characters)
                {
                    // Pages -> Paragraphs -> Lines -> Words -> Characters
                    int CharacterNumber = character.CharacterNumber;
                    string CharacterText = character.Text;
                    AnyBitmap CharacterImage = character.ToBitmap(ocrInput);
                    int CharacterX_location = character.X;
                    int CharacterY_location = character.Y;
                    int CharacterWidth = character.Width;
                    int CharacterHeight = character.Height;
                    double CharacterOcrAccuracy = character.Confidence;
                    // Output alternative symbols choices and their probability.
                    // Very useful for spellchecking
                    OcrResult.Choice[] Choices = character.Choices;
                }
            }
        }
    }
}
Install-Package IronOcr
Create Searchable PDFs by OCR See All 24 Code Examples
using IronOcr;

var ocrTesseract = new IronTesseract();

using var ocrInput = new OcrInput();
ocrInput.AddImage(@"images\page1.png");
ocrInput.AddImage(@"images\page2.bmp");
ocrInput.AddImage(@"images\page3.tiff");

ocrInput.Deskew();

var ocrResult = ocrTesseract.Read(ocrInput);

ocrResult.SaveAsSearchablePdf("searchable.pdf");
Install-Package IronOcr
Tesseract 5 for .NET See All 24 Code Examples
using IronOcr;
using System;

var ocrTesseract = new IronTesseract();

// This is done by default and can be omitted:
// ocrTesseract.Configuration.TesseractVersion = TesseractVersion.Tesseract5;

using var ocrInput = new OcrInput();
ocrInput.AddImage(@"images\image.png");
var ocrResult = ocrTesseract.Read(ocrInput);
Console.WriteLine(ocrResult.Text);
Install-Package IronOcr
IronOCR

The OCR Solution for your .NET Applications...

.NET Developer Support

Human Support

Talk directly with our development team

Ask a Question
C# API Reference and Get Started Tutorials

Documentation

Clear online manuals in plain English.

View Documentation
C# Library Licensing

Simple Licensing

Free development license. Commercial from $749.

Browse Options
Install The C# OCR library

Get Started Now

Get started in minutes with NuGet or DLL.

Install & Try Now
Try IronOCR for Free
Get Set Up in 5 Minutes
C# NuGet Library for PDF
Install with NuGet
Version: 2023.12
Install-Package IronOcr
nuget.org/packages/IronOcr/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronOCR"
  3. Select the package and install
C# PDF DLL
Download DLL
Version: 2023.12
Download Now
or download Windows Installer here.
  1. Download and unzip IronOCR to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronOCR.dll"
Licenses from $749

Have a question? Get in touch with our development team.

15 1000 1
Now that you’ve downloaded IronOCR
Want to deploy IronOCR to a live project for FREE?
Not ready to buy?

Want to deploy IronOCR to a live project for FREE?

What’s included?
Test in production without watermarks
30 days fully functional product
24/5 technical support during trial
Get your free 30-day Trial Key instantly.
Thank you.
If you'd like to speak to our licensing team:

badge_greencheck_in_yellowcircle

The trial form was submitted
successfully.

Your trial key should be in the email.
If it is not, please contact
support@ironsoftware.com

Schedule a call
Have a question? Get in touch with our development team.
No credit card or account creation required
15 1000 1
Now that you’ve downloaded IronOCR
Want to deploy IronOCR to a live project for FREE?
Not ready to buy?

Want to deploy IronOCR to a live project for FREE?

What’s included?
Test in production without watermarks
15 days fully functional product
24/5 technical support during trial
Get your free 15-day Trial Key instantly.
Thank you.
If you'd like to speak to our licensing team:

badge_greencheck_in_yellowcircle

The trial form was submitted
successfully.

Your trial key should be in the email.
If it is not, please contact
support@ironsoftware.com

Schedule a call
Have a question? Get in touch with our development team.
No credit card or account creation required
15 1000 1
Your Trial License Key has been emailed to you.
Not ready to buy?
Thank you.
View your license options:
Thank you.
If you'd like to speak to our licensing team:
View Licensing
Schedule a call
Have a question? Get in touch with our development team.
Have a question? Get in touch with our development team.
15 1000 1
Want to deploy IronOCR to a live project for FREE?
Not ready to buy?

Want to deploy IronOCR to a live project for FREE?

What’s included?
Test in production without watermarks
30 days fully functional product
24/5 technical support during trial
Get your free 30-day Trial Key instantly.
Thank you.
If you'd like to speak to our licensing team:

badge_greencheck_in_yellowcircle

The trial form was submitted
successfully.

Your trial key should be in the email.
If it is not, please contact
support@ironsoftware.com

Schedule a call
Have a question? Get in touch with our development team.
No credit card or account creation required
15 1000 1
Want to deploy IronOCR to a live project for FREE?
Not ready to buy?

Want to deploy IronOCR to a live project for FREE?

What’s included?
Test in production without watermarks
15 days fully functional product
24/5 technical support during trial
Get your free 15-day Trial Key instantly.
Thank you.
If you'd like to speak to our licensing team:

badge_greencheck_in_yellowcircle

The trial form was submitted
successfully.

Your trial key should be in the email.
If it is not, please contact
support@ironsoftware.com

Schedule a call
Have a question? Get in touch with our development team.
No credit card or account creation required
15 1000 1
Your Trial License Key has been emailed to you.
Not ready to buy?
Download IronOCR free to apply
your Trial Licenses Key
Thank you.
If you'd like to speak to our licensing team:
Install with NuGet View Licensing
Schedule a call
Licenses from $749. Have a question? Get in touch.
Have a question? Get in touch with our development team.
15 1000 1
Your Trial License Key has been emailed to you.
Not ready to buy?
Download IronOCR free to apply
your Trial Licenses Key
Thank you.
If you'd like to speak to our licensing team:
Install with NuGet View Licensing
Schedule a call
Licenses from $749. Have a question? Get in touch.
Have a question? Get in touch with our development team.
ironocr_for_dotnet

Get started for FREE

No credit card required

Test in a live environment

Test in production without watermarks.
Works wherever you need it to.

bullet_test

Fully-functional product

Get 30 days of fully functional product.
Have it up and running in minutes.

bullet_calendar

24/5 technical support

Full access to our support engineering team during your product trial

bullet_support
ironocr_for_dotnet

Get your free 30-day Trial Key instantly.

bullet_checkedNo credit card or account creation required

badge_greencheck_in_yellowcircle

The trial form was submitted
successfully.

Your trial key should be in the email.
If it is not, please contact
support@ironsoftware.com

Trusted by Over 2 Million Engineers Worldwide

  • aetna_logo
  • wwf_logo
  • nasa_logo
  • usda_logo
  • 3m_logo
  • tesla_logo
ironocr_for_dotnet

Get started for FREE

No credit card required

Test in a live environment

Test in production without watermarks.
Works wherever you need it to.

bullet_test

Fully-functional product

Get 30 days of fully functional product.
Have it up and running in minutes.

bullet_calendar

24/5 technical support

Full access to our support engineering team during your product trial

bullet_support
ironocr_for_dotnet

Get your free 30-day Trial Key instantly.

bullet_checkedNo credit card or account creation required

badge_greencheck_in_yellowcircle

The trial form was submitted
successfully.

Your trial key should be in the email.
If it is not, please contact
support@ironsoftware.com

Trusted by Over 2 Million Engineers Worldwide

  • aetna_logo
  • wwf_logo
  • nasa_logo
  • usda_logo
  • 3m_logo
  • tesla_logo
ironocr_for_dotnet

Get started for FREE

No credit card required

Test in a live environment

Test in production without watermarks.
Works wherever you need it to.

bullet_test

Fully-functional product

Get 30 days of fully functional product.
Have it up and running in minutes.

bullet_calendar

24/5 technical support

Full access to our support engineering team during your product trial

bullet_support
ironocr_for_dotnet

Get your free 30-day Trial Key instantly.

Install with NuGet
View Licensing

Licenses from $749. Have a question? Get in touch.

Trusted by Over 2 Million Engineers Worldwide

  • aetna_logo
  • wwf_logo
  • nasa_logo
  • usda_logo
  • 3m_logo
  • tesla_logo
Start for Free Free NuGet Download

Fully-functional product, get the key instantly

PM > Install-Package IronOcr

IronOCR for .NET

Tesseract 5 OCR in the languages you need, We support 127+.

Search

CtrlK

Documentation

  • Code Examples
  • API Reference
  • How-Tos
  • Features
  • Credits
  • Blog
  • Product Brochure

Tutorials

  • Get Started
  • C# Image to Text
  • C# Tesseract OCR
  • OCR Image Filters
  • OCR with Computer Vision

Licensing

  • Buy a License
  • Support Extensions
  • Resellers
  • License Keys
  • EULA

Try IronOCR Free

  • Download on NuGet
  • Download DLL

  • Download Windows Installer

  • Start Free Trial

When you need your PDF to look like HTML, fast.

Tesseract 5 OCR in the languages you need, We support 127+.

The Excel API you need, without the Office Interop hassle.

When you need to zip and unzip archives, fast.

When you need to read, write, and style QR codes, fast.

When you need to read, write, and style Barcodes, fast.

The power you need to scrape & output clean, structured data.

The complete .NET Suite for your office.

  • IRONSUITE
  • |
  • IRONPDF
  • IRONOCR
  • IRONXL
  • IRONZIP
  • IRONQR
  • IRONBARCODE
  • IRONWEBSCRAPER
IronSoftware
205 N. Michigan Ave. Chicago, IL 60611 USA +1 (312) 500-3060
  • About Us
  • News
  • Customers
  • Careers
  • Contact Us
  • Join Iron Slack

Supporting Teamseas

Copyright © Iron Software LLC 2013-2023

  • Terms
  • Privacy

Thank you!

Your license key has been delivered to the email provided. Contact us

24-Hour Upgrade Offer:

Save 50% on a
Professional Upgrade

Go Professional to cover 10 developers
and unlimited projects.

hours

:

minutes

:

seconds

Upgrade to Professional

Upgrade

Professional

$600 USD

$299 USD


  • 10 developers
  • 10 locations
  • 10 projects
TODAY ONLY
Iron Suite

5 .NET Products for the Price of 2

IronPDF IronOCR IronXL IronBarcode IronWebscraper

Total Suite Value:

$7,192 USD

Upgrade price

TODAY
ONLY

$499 USD

After 24 Hrs

$1,098 USD