Our Customers
Contact Us Email: support@barcodelib.com
Home > .NET Barcode Reader > C#.NET Barcode Recognition Guide > Use C# Code to Decode EAN-8 in .NET, ASP.NET & WinForms Project
Download Barcode Reader for .NET Trial

How to Read EAN-8 Barcode Using C# Class Code

Mature C#.NET Barcode Scanner for Linear EAN-8 Barcode Image Reading
  • Professional EAN-8 C#.NET barcode reading dll with fast scanning rate
  • Able to read & scan EAN-8 barcode in ASP.NET Web application using C#
  • Easy to decode EAN-8 linear barcode in Windows Forms project using C#
  • Able to scan EAN-8 barcode in a certain area of target image file using C#
  • Scan & read maximum linear EAN-8 barcode per page in a short time
  • Support reading other linear (1d) barcode images in C# class, like C# Code 128 & C# EAN-13
Install EAN-8 Barcode Decoding DLL to C#.NET Project
Find BarcodeLib.BarcodeReader.dll in the downloaded trial package and integrate it to your C#.NET project by adding reference.
Use C# Class Code to Decode & Scan EAN-8 Barcode Image
Following C# code is used to scan & read all EAN-8 barcodes from target image file.
     string[] results = BarcodeReader.read("c:/ean8-csharp.png", BarcodeReader.EAN8);
Use C# Class Code to Optimize EAN-8 Barcode Reading Function
This .NET barcode reading library equips you with the flexibility to customize the scanning speed in different situations.
Case 1: There is only one large-size EAN-8 barcode in the target file.
If you read this maximum EAN-8 barcode in the common way, then it is really time-consuming. So our C#.NET EAN-8 barcode reader offers you a unique way to read large-size EAN-8 barcode in the shortest time.
You just set maxOneBarcodePerPage to true. Then the C#.NET barcode scanning component will stop reading the barcode as soon as it detects this EAN-8 barcode. In this way, you do not need to wait for the barcode reader to scan the target image file using total 5 algorithms (each algorithm will read the whole source file from 4 directions).
Case 2: The EAN-8 barcode images are concentrated in a certain area of the target image file.
If you are going to read a small-size EAN-8 barcode which is located in a large-size image file, then you cannot afford the time to let barcode reader scan the whole target image for decoding that EAN-8 barcode.
Thus, our C#.NET EAN-8 barcode decoder can largely shorten the scanning time by reducing the scanning area. For example, if the EAN-8 barcode is located in the area of top 20% and bottom 20% of the image file, then you just need to direct the barcode reader to recognize EAN-8 barcode in that area. And following C# sample codes can help you do that.
     OptimizeSetting setting = new OptimizeSetting();


ScanArea top20 = new ScanArea(new PointF(0.0F, 0.0F), new PointF(100.0F, 20.0F));

ScanArea bottom20 = new ScanArea(new PointF(0.0F, 80.0F), new PointF(100.0F, 100.0F));

List<ScanArea> areas = new List<ScanArea>();


string[] results = BarcodeReader.read("c:/ean8-barcode.png", BarcodeReader.EAN8, setting);
C# Barcode Reading Guide for Other Barcodes
Scan 1D Barcode Images:
Scan 2D Barcode Images: