Code 128 Image Sample -
.NET Barcode Reader SDK Building up Perfect Quality Barcode Reading Software for .NET Online Demo Download Trial Purchase Now

How to Read EAN-8 in C# & VB.NET

back to home  >  .NET Barcode Reader SDK  >  Recognize Barcodes in .NET  >  C# and VB.NET Tutorial for EAN-8 Scanning

It is found that many customers are in need of a .NET solution for EAN-8 barcode recognition in VB.NET and C#.NET programming. If you are one of them, have a try with pqScan .NET Control for Barcode Scanning. This professional .NET barcode scanner control supports fast and effective EAN-8 linear barcodes reading and decoding.

We know it is necessary to guide C# and VB.NET users to well test and use our barcode reader library dll. Then this online tutorial is written. Users are always suggested to have a basic understanding of EAN-8 bar code before developing Visual Studio .NET barcode recognition project. If necessary, you may directly see EAN-8 description from Wiki.

How to with Free Demo Code

In all, there are six APIs are simple to be implemented in C# and VB.NET EAN-8 decoding applications, which enables programmers to not only recognize all barcode types from loaded image file but also choose to read EAN-8 barcode symbology only. Please see detailed APIs and sample coding in the following parts.

C# Demo: Tell Scanner to Scan EAN-8 Only

This Visual C# programming demo is used to direct our barcode decoder library to only read all EAN-8 barcodes from loaded image source. You may also see another two APIs for recognizing EAN-8 from images in Bitmap and Stream values.

public void ScanEAN8FromFile(string filename)
  // Detect and read EAN-8 only in C#.NET program.
  BarcodeResult[] results = BarCodeScanner.Scan(filename, BarCodeType.EAN8);

  // Used to detect and read EAN-8 from image source in Bitmap or Stream value.
  // public static BarcodeResult[] Scan(Bitmap bitmap, BarCodeType barType);
  // public static BarcodeResult[] Scan(Stream stream, BarCodeType barType);

  foreach (BarcodeResult result in results)
    Console.WriteLine(result.BarType.ToString() + "-" + result.Data);

VB.NET Demo: Tell Scanner to Decode All Barcode Types

The following .NET APIs and VB.NET class code are designed for reading all barcode types including EAN-8 linear barcode from image file in Visual Basic .NET application.

Public Sub ScanAllFromFile(ByVal filename As String)
  ' Detect and scan all barcode types from a local image file.
  Dim results() As BarcodeResult = BarCodeScanner.Scan(filename) 

  ' Used to detect and scan all barcode types from a loaded image in Bitmap or Stream value.
  ' public static BarcodeResult[] Scan(Bitmap bitmap)
  ' public static BarcodeResult[] Scan(Stream stream)

  Dim result As BarcodeResult
  For Each result In results
    Console.WriteLine(result.BarType.ToString() + "-" + result.Data)
End Sub

Besides EAN-8 linear bar code, our Barcode Reader Component for .NET also supports other bar codes recognition in Visual Studio C# and VB.NET programs, like EAN-13, Codabar, Code 39, Code 128, UPC-A, UPC-E, ITF-14, QR Code, etc. If you have requests or questions, please contact us via email (

pqScan SDK
.NET Barcode Decoder Software
Online Guide
Barcode Decoding for .NET Barcode Decoding Using C# Barcode Decoding Using VB
Barcode Type
Decode QR Code for C#/VB Decode PDF-417 for C#/VB Decode Data Matrix for C#/VB Decode Aztec Code for C#/VB Decode Code 128 for C#/VB Decode Code 39 for C#/VB Decode EAN-13 for C#/VB Decode UPC-A for C#/VB Decode UPC-E for C#/VB Decode Code 93 for C#/VB Decode Codabar for C#/VB Decode ITF-14 for C#/VB View All Barcodes >>
My experience of using pqScan .NET barcode scanner SDK is awesome. This SDK is great and I promptly complete the task at hand. Highly recommend pqScan product. Again, many thanks to your staff. Patrick Rupp