ByteScout Text Recognition SDK - C# - Recognize Text From Document - ByteScout

ByteScout Text Recognition SDK – C# – Recognize Text From Document

  • Home
  • /
  • Articles
  • /
  • ByteScout Text Recognition SDK – C# – Recognize Text From Document

How to recognize text from document in C# using ByteScout Text Recognition SDK

How to code in C# to recognize text from document with this step-by-step tutorial

Recognize text from document is easy to implement in C# if you use these source codes below. ByteScout Text Recognition SDK: the text recognition SDK to help with extraction of text using OCR from scanned images and documents. Supports English and non-Latin languages, can take PDF as input. It can recognize text from document in C#.

C# code samples for C# developers help to speed up coding of your application when using ByteScout Text Recognition SDK. In order to implement the functionality, you should copy and paste this code for C# below into your code editor with your app, compile and run your application. Use of ByteScout Text Recognition SDK in C# is also explained in the documentation included along with the product.

ByteScout Text Recognition SDK free trial version is available on our website. C# and other programming languages are supported.

Try ByteScout Text Recognition SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

Program.cs
      
using System; using System.Diagnostics; using ByteScout.TextRecognition; namespace TextRecognitionExample { class Program { static void Main(string[] args) { string inputDocument = @".\invoice-sample.png"; string outputDocument = @".\result.txt"; // Create and activate TextRecognizer instance using (TextRecognizer textRecognizer = new TextRecognizer("demo", "demo")) { try { // Load document (image or PDF) textRecognizer.LoadDocument(inputDocument); // Set the location of OCR language data files textRecognizer.OCRLanguageDataFolder = @"c:\Program Files\ByteScout Text Recognition SDK\ocrdata_best\"; // Set OCR language. // "eng" for english, "deu" for German, "fra" for French, "spa" for Spanish, etc. - according to files in "ocrdata" folder // Find more language files at https://github.com/bytescout/ocrdata textRecognizer.OCRLanguage = "eng"; // Recognize text from all pages and save it to file textRecognizer.SaveText(outputDocument); // Open the result file in default associated application (for demo purposes) Process.Start(outputDocument); } catch (Exception exception) { Console.WriteLine(exception); } } Console.WriteLine(); Console.WriteLine("Press any key..."); Console.ReadKey(); } } }

Try ByteScout Text Recognition SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

VIDEO

ON-PREMISE VERSION INFORMATION

Get 60 Day Free Trial or Visit ByteScout Text Recognition SDK Home Page

Explore ByteScout Text Recognition SDK Documentation

Get ByteScout Text Recognition SDK Free Training

WEB API

Get Your Free API Key

Explore Web API Documentation

Tutorials:

prev
next