KA.Barcode for .NET Suite
How to Generate EAN-8 in .NET Application
How to generate & create EAN-8 barcode images in ASP.NET, WinForms, C#, VB.NET class library
  • Easily generate EAN-8, EAN-8+2, EAN-8+5 linear barcode symbols in .NET projects
  • Print high-quality EAN8 barcodes with Visual C#, VB.NET programming
  • Create, paint dynamic EAN-8 in windows applications, ASP.NET web sites, Crystal Reports, SSRS, IIS
  • Compatible with Visual Studio 2005 or greater and other .NET development environments
  • Full integration with .NET Framework 2.0, 3.0, 3.5 and above
  • Allow the adjustment of EAN-8 size through bar width & height, image width & height, space, etc
  • Support customization of text font & style of human-readable-text
  • Automatically add and generate the checksum digit in EAN-8
KA.Barcode for .NET Suite allows linear EAN-8 barcodes to be generated in various .NET applications. All the generated EAN-8 barcodes are valid for all printers and readers. Moreover, developers can make necessary adjustments for EAN-8 images with C#/VB.NET programming.
EAN-8 Barcode Introduction
EAN-8 is the short version of International Article Number (EAN). It is used globally for the identification of small package in retailing industry.

EAN-8 Encodable Character Set

  • 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

EAN-8 Data Length

  • 7 digits, excluding the last checksum that is automatically added by KA.Barcode generator
EAN-8 Generation in .NET Applications
Above all, please download KA.Barcode for .NET Suite and unzip.

How to Drag & Drop Barcode Control to Generate EAN-8

  1. 1.
    Open your .NET Project with Visual Studio, and right-click "Choose Items..."
  2. 2.
    Browse and select "KeepAutomation.Barcode.Windows.dll" or "KeepAutomation.Barcode.Web.dll"
  3. 3.
    Add "BarCodeControl" to Visual Studio "Toolbox"
  4. 4.
    Drag and drop the "BarCodeControl" from the "Toolbox" onto your forms
  5. 5.
    Select the barcode on the form, switch to the Properties Window, and set "Symbology" property to "EAN8"

How to Generate EAN-8 in C#, VB.NET Class Library

Switch to the Visual Studio Solution Explorer window, and add "KeepAutomation.Barcode.Windows.dll" or "KeepAutomation.Barcode.Web.dll" to as reference of the project. Then copy the following C# or VB.NET to where the EAN-8 is generated.
using KeepAutomation.Barcode.Bean;

BarCode ean8 = new BarCode();
ean8.Symbology = KeepAutomation.Barcode.Symbology.EAN8;
ean8.CodeToEncode = "0123456";
Dim ean8 As KeepAutomation.Barcode.Bean.BarCode = New KeepAutomation.Barcode.Bean.BarCode

ean8.Symbology = KeepAutomation.Barcode.Symbology.EAN8
ean8.CodeToEncode = "0123456"

How to Generate EAN-8 with Supplement Barcode

Two types of supplement barcode could be added to EAN-8 for the encoding and display of additional information. They are two-digit supplement barcode (EAN8Sup2) and five-digit supplement barcode (EAN8Sup5). The data, height, and space between EAN-8 and supplement barcode are customizable. Please copy the following code to your project:
Two-digit supplement barcode (EAN8Sup2)
using KeepAutomation.Barcode.Bean;

BarCode ean8sup2 = new BarCode();
ean8sup2.Symbology = KeepAutomation.Barcode.Symbology.EAN8Sup2;
ean8sup2.CodeToEncode = "0123456";
ean8sup2.SupplementCode = "12";
ean8sup2.SupplementHeight = 0.8f;
ean8sup2.SupplementSpace = 15;

Dim ean8sup2 As KeepAutomation.Barcode.Bean.BarCode = New KeepAutomation.Barcode.Bean.BarCode

ean8sup2.Symbology = KeepAutomation.Barcode.Symbology.EAN8Sup2
ean8sup2.CodeToEncode = "0123456"
ean8sup2.SupplementCode = "12"
ean8sup2.SupplementHeight = 0.8
ean8sup2.SupplementSpace = 15
Five-digit supplement barcode (EAN8Sup5)
using KeepAutomation.Barcode.Bean;

BarCode ean8sup5 = new BarCode();
ean8sup5.Symbology = KeepAutomation.Barcode.Symbology.EAN8Sup5;
ean8sup5.CodeToEncode = "0123456";
ean8sup5.SupplementCode = "12345";
ean8sup5.SupplementHeight = 0.8f;
ean8sup5.SupplementSpace = 15;
Dim ean8sup5 As KeepAutomation.Barcode.Bean.BarCode = New KeepAutomation.Barcode.Bean.BarCode

ean8sup5.Symbology = KeepAutomation.Barcode.Symbology.EAN8Sup5
ean8sup5.CodeToEncode = "0123456"
ean8sup5.SupplementCode = "12345"
ean8sup5.SupplementHeight = 0.8
ean8sup5.SupplementSpace = 15
How to Generate EAN-8 in Microsoft IIS
  1. 1.
    Copy the "barcode" folder from the unzipped folder to IIS web application folder
  2. 2.
    Create a virtual directory named "barcode", then link it to the "barcode" folder in web application folder
  3. 3.
    Testing: Open your web browser, and navigate to "http://localhost/barcode/barcode.aspx?symbology=12&code-to-encode=0123456"(symboloy: EAN8=12, EAN8Sup2=13, EAN8Sup5=14)
  4. 4.
    Adding EAN-8 to web page: insert the following tag onto your web pages <img src="http://localhost/barcode/barcode.aspx?symbology=12&code-to-encode=0123456"/>