Visual C#.NET: OCR Document & Images

How to OCR on document image using C#.NET
Yiigo.Image for .NET provides advanced Optical Character Recognition support, allowing developers to OCR on documents and images from documents and images in bitonal, color and grayscale. Find more OCR information on Yiigo.Imaging for .NET OCR Plugin.
Yiigo.Imaging for .NET OCR Plugin has those following functionalities:
  • Full Unicode support
  • Automatically detect the document's language, including English, Spanish, French, German, Japanese, Chinese, Arabic and more
  • Extract text from certain area of page or the whole page
  • Create searchable PDF documents
  • Convert your document images to a PDF or Microsoft Word Document
  • Save OCR results to a PDF document as text or as hidden text under the rasterized image
  • Save OCR results to a text (TXT) document
recognize optical characters on documents and images using Yiigo.Image for .NET. Find more OCR tutorials on VB.NET Tesseract OCR, Web Imaging Viewer OCR Support and OCR in .NET Winforms.
OCR with C#.NET Sample Code


Before starting OCR in Visual C#.NET, make sure that you have installed.

Start to OCR

  • Open and run your Microsoft Visual Studio;
  • Choose either "Visual C# Projects" in "New Project" dialog box;
  • Choose "Windows Application" in the "Templates" List and name it "YiigoImagingOCRCsharp";
  • Right-click on the "References" folder, and select "Add Reference..." from the context menu in the "Solution Explorer" window;
  • In the "Add Reference" dialog box, select the ".NET" tab and browse to Yiigo.Imaging.Net.dll library and Yiigo.Imaging.Net.Recognition.Ocr.dll;
  • Add it to your Visual C# applications;
  • Call Yiigo .NET Image Namespace & Copy those following codes:
using System.IO;
using System.Drawing.Printing;
using Yiigo.Imaging;
using Yiigo.Imaging.Processing;
using Yiigo.Imaging.Recognition.OCR;

// Initialize OCR Engine
TesseractOcrEngine OcrEngine = new TesseractOcrEngine();
TesseractOcrEngine.Translate(imageCollection, "application/msword", outputPath);

// Cancel OCR in Progress
TesseractOcrEngine.PageProgressCancel = "True";

// Recognize Pages
private void button6_Click(object sender, EventArgs e)

string pdfFileName = @"C:\Ocr1.pdf";
_ocrDocument.Save(pdfFileName, DocumentFormat.Pdf, null);

// Create a Searchable PDF
TesseractOcrEngine OcrEngine = new TesseractOcrEngine();
PDFGenerator PDFGenerator = new PDFGenerator();
PDFGenerator.Save = @"C: \Ocr1.pdf";
Other Plugins
Image Viewer CoreBarcode PluginPDF Read & WriteTesseract OCR PluginForm Processing PluginJBIG2 CodecJPEG2000 CodecISIS ScannerTwain ScannerDICOM ReaderCAD Scanner