ByteScout Barcode Reader SDK - C# - Decode EAN-2 - ByteScout

ByteScout Barcode Reader SDK – C# – Decode EAN-2

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Reader SDK – C# – Decode EAN-2

How to decode EAN 2 in C# and ByteScout BarCode Reader SDK

The tutorial below will demonstrate how to decode EAN 2 in C#

The sample source codes on this page shows how to decode EAN 2 in C#. ByteScout BarCode Reader SDK: the SDK for barcode decoding. Can read all popular types from Code 128, GS1, UPC and Code 39 to QR Code, Datamatrix, PDF417. Images, pdf, TIF images and live web camera are supported as input. Designed to handle documents with noise and defects. Includes optional splitter and merger for pdf and tiff based on barcodes. Batch mode is optimized for high performance with multiple threads. Decoded values can be exported to XML, JSON, CSV or into custom data format. It can decode EAN 2 in C#.

C# code samples for C# developers help to speed up coding of your application when using ByteScout BarCode Reader SDK. Just copy and paste the code into your C# application’s code and follow the instruction. You can use these C# sample examples in one or many applications.

ByteScout BarCode Reader 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.IO; using Bytescout.BarCodeReader; namespace ReadEAN2 { class Program { const string ImageFile = "EAN2.png"; static void Main() { Console.WriteLine("Reading barcode(s) from image {0}", Path.GetFullPath(ImageFile)); Reader reader = new Reader(); reader.RegistrationName = "demo"; reader.RegistrationKey = "demo"; // Set barcode type to find reader.BarcodeTypesToFind.EAN2 = true; // EAN-2 barcode is normally supplemental to EAN-13 so we should force the detection of standalone EAN-2 barcode. reader.AllowOrphanedSupplementals = true; /* ----------------------------------------------------------------------- NOTE: We can read barcodes from specific page to increase performance. For sample please refer to "Decoding barcodes from PDF by pages" program. ----------------------------------------------------------------------- */ // Read barcodes FoundBarcode[] barcodes = reader.ReadFrom(ImageFile); foreach (FoundBarcode barcode in barcodes) { Console.WriteLine("Found barcode with type '{0}' and value '{1}'", barcode.Type, barcode.Value); } // Cleanup reader.Dispose(); Console.WriteLine("Press any key to exit.."); Console.ReadKey(); } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout BarCode Reader SDK Home Page

Explore ByteScout BarCode Reader SDK Documentation

Explore Samples

Sign Up for ByteScout BarCode Reader 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 BarCode Reader SDK Home Page

Explore ByteScout BarCode Reader SDK Documentation

Explore Samples

Sign Up for ByteScout BarCode Reader SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next