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

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

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

How to decode EAN 5 in C# with ByteScout BarCode Reader SDK

This code in C# shows how to decode EAN 5 with this how to tutorial

Learn how to decode EAN 5 in C# with this source code sample. ByteScout BarCode Reader SDK is 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 5 in C#.

The SDK samples like this one below explain how to quickly make your application do decode EAN 5 in C# with the help of ByteScout BarCode Reader 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. Implementing C# application typically includes multiple stages of the software development so even if the functionality works please test it with your data and the production environment.

Download free trial version of ByteScout BarCode Reader SDK from our website with this and other source code samples for C#.

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

Program.cs
      
using System; using System.IO; using Bytescout.BarCodeReader; namespace ReadEAN5 { class Program { const string ImageFile = "EAN5.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.EAN5 = true; // EAN-5 barcode is normally supplemental to EAN-13 so we should force the detection of standalone EAN-5 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(); } } }

Try ByteScout BarCode Reader 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 BarCode Reader SDK page

Explore ByteScout BarCode Reader SDK documentation

WEB API

Sign Up for free Web API key

Explore Web API Documentation

Tutorials:

prev
next