VB.NET EAN-8 Generator Data Encoding Tutorial
sample source code to input valid data and generate linear EAN-8 images in VB.NET
EAN-8 VB.NET Generator Setup
EAN-8, also known as European Article Number 8, UPC-8, GTIN-8, GS1-8, EAN/UCC-8, is the short barcode version of EAN-13 barcode.
How to generate, print barcode using .NET, Java sdk library control with example project source code free download:
OnBarcode.com provides more details about how to set EAN-8 barcode size and image in Barcode Generator Control on VB.NET:
Codabar VB.NET Generator installation
1. Download the trial package and unzip
2. Copy OnBarcode.Barcode.WinForms.dll to your .NET project folder
3. Do not copy dll to .NET bin directory, .NET build tools will do it for you.
4. Add OnBarcode.Barcode.WinForms.dll to .NET project reference
5. Right click .NET Visual Studio Toolbox, select menu Choose Items...
6. In "Choose Toolbox Items" form, click button "Browse...", and select OnBarcode.Barcode.WinForms.dll
7. After selection, you will find four items under "Components" section: LinearWinForm, DataMatrixWinForm, PDF417WinForm, and QRCodeWinForm
After, get it ready in VB.NET by placing the following statement where EAN-8 VB.NET Generator is needed:
Dim ean8 As OnBarcode.Barcode.Linear
ean8 = New OnBarcode.Barcode.Linear
ean8.Type = OnBarcode.Barcode.BarcodeType.EAN8
Valid length for Data in EAN-8 VB.NET Generator
EAN-8 Data Length
EAN-8 is a fixed length barcode symbology. There are 8 digits of numeric characters in an EAN-8. The last digit of them is the prerequisite check digit.
Digits in EAN-8 VB.NET Generator
EAN-8 VB.NET Generator will automatically generate and calculate the check digit in EAN-8 basing on the string value you give to property Data. That is to say, using EAN-8 VB.NET Generator, you only have to place 7 digits of numeric characters in the string value of Data.
For example, if "1234567" is to be encoded, there will be 8 digits on the image ("12345670"), the last digit ("0") is the check digit EAN-8 VB.NET Generator automatically generates and calculates for you.
Sample usage:
Dim ean8 As OnBarcode.Barcode.Linear = New OnBarcode.Barcode.Linear
ean8.Type = OnBarcode.Barcode.BarcodeType.EAN8
ean8.Data = "1234567"
Sample image:

Data Character Set for EAN-8 VB.NET Generator
Encode Numeric Character in EAN-8 barcode image
The characters in EAN-8 are numeric. Only numbers 0 through 9 are valid for EAN-8. The data encoded in the EAN-8 in your VB.NET project is defined by property Data. The value of Data is string value.
Sample usage:
ean8.Data = "1234567"
Draw 2-digit add-on symbol in the image
According to its symbology specification and GS1 specification, a 2-digit add-on symbol could be used in EAN-8 beside its main barcode to supplement the data. When 2-digit add-on is needed, the type should be changed from EAN8 to EAN8_2. Besides, supplement data should be given to property SupData, shown in following Sample usage.
Sample usage:
Dim ean8 As OnBarcode.Barcode.Linear = New OnBarcode.Barcode.Linear
ean8.Type = OnBarcode.Barcode.BarcodeType.EAN8_2
ean8.Data = "1234567"
ean8.SupData = "12"
Sample image:

Encode 5 digits in EAN-8 Add-on
Similarly, 5-digit add-on symbol could be used in EAN-8 where 2-digit add-on could be placed to encode more supplement data.
Sample usage:
Dim ean8 As OnBarcode.Barcode.Linear = New OnBarcode.Barcode.Linear
ean8.Type = OnBarcode.Barcode.BarcodeType.EAN8_5
ean8.Data = "1234567"
ean8.SupData = "12345"
Sample image:
