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.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

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(); } } }

ON-PREMISE OFFLINE SDK

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

Explore ByteScout Text Recognition SDK Documentation

Explore Samples

Sign Up for ByteScout Text Recognition SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

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

Explore ByteScout Text Recognition SDK Documentation

Explore Samples

Sign Up for ByteScout Text Recognition SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next