ByteScout Invoice Parser SDK - C# - Parse Invoice With OCR - ByteScout

ByteScout Invoice Parser SDK – C# – Parse Invoice With OCR

  • Home
  • /
  • Articles
  • /
  • ByteScout Invoice Parser SDK – C# – Parse Invoice With OCR

How to parse invoice with OCR in C# and ByteScout Invoice Parser SDK

The tutorial below will demonstrate how to parse invoice with OCR in C#

With this source code sample you may quickly learn how to parse invoice with OCR in C#. What is ByteScout Invoice Parser SDK? It is the SDK for automatic invoice parsing and data extraction. Thousands of companies are supported out of the box! Detects and extracts a company name, invoice number, date, total amount to be paid and other fields. Constantly updated database of supported invoices. Batch processing is supported. Outputs JSON, CSV, XML data and can be integrated with other apps and tools. It can help you to parse invoice with OCR in your C# application.

Fast application programming interfaces of ByteScout Invoice Parser SDK for C# plus the instruction and the code below will help you quickly learn how to parse invoice with OCR. 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. Enjoy writing a code with ready-to-use sample codes in C#.

ByteScout free trial version is available for download from our website. It includes all these programming tutorials along with source code samples.

Try ByteScout Invoice Parser SDK today: Get 60 Day Free Trial or sign up for Web API

Program.cs
      
using System; using ByteScout.InvoiceParser; // This example demonstrates the use of Optical Character Recognition (OCR) to parse invoice data // from scanned PDF documents and raster images. namespace ParseWithOCR { class Program { static void Main(string[] args) { string inputDocument1 = @".\DigitalOcean-scanned.jpg"; // Create InvoiceParser instance using (InvoiceParser invoiceParser = new InvoiceParser("demo", "demo")) { // Enable Optical Character Recognition (OCR) // in .Auto mode (SDK automatically checks if needs to use OCR or not) invoiceParser.OCRMode = OCRMode.Auto; // Set the location of OCR language data files invoiceParser.OCRLanguageDataFolder = @"c:\Program Files\ByteScout Invoice Parser SDK\ocrdata"; // Set OCR language // "eng" for english, "deu" for German, "fra" for French, etc. - according to files in "ocrdata" folder invoiceParser.OCRLanguage = "eng"; // Find more language files at https://github.com/bytescout/ocrdata Console.WriteLine({code}quot;Parsing \"{inputDocument1}\"..."); Console.WriteLine(); // Parse invoice data in JSON format string jsonString = invoiceParser.ParseDocument(inputDocument1, OutputFormat.JSON); // Display parsed data in console Console.WriteLine("Parsing results in JSON format:"); Console.WriteLine(); Console.WriteLine(jsonString); } Console.WriteLine(); Console.WriteLine("Press any key to continue..."); Console.ReadLine(); } } }

Try ByteScout Invoice Parser SDK today: 60 Day Free Trial (on-premise version) or sign up for Web API (on demand version)

VIDEO

ON-PREMISE VERSION

Get 60 Day Free Trial or Visit ByteScout Invoice Parser SDK page

Explore ByteScout Invoice Parser SDK documentation

WEB API

Sign Up for free Web API key

Explore Web API Documentation

prev
next