VB.NET EAN-13 Generator Data Encoding Tutorial

sample source code to input valid data and generate linear EAN-13 images in VB.NET


 

EAN-13 VB.NET Generator Setup

EAN-13, also known as European Article Number 13, UPC-13, GTIN-13, GS1-13, EAN/UCC-13, is the standard barcode version of European Article Number.




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-13 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-13 VB.NET Generator is needed:

Dim ean13 As OnBarcode.Barcode.Linear

ean13 = New OnBarcode.Barcode.Linear

ean13.Type = OnBarcode.Barcode.BarcodeType.EAN13

 

Valid length for Data in EAN-13 VB.NET Generator

EAN-13 Data Length

EAN-13 is a fixed length barcode symbology. There are 13 digits of numeric characters in an EAN-13. The last digit of them is the prerequisite check digit.

Digits in EAN-13 VB.NET Generator

EAN-13 VB.NET Generator will automatically generate and calculate the check digit in EAN-13 basing on the string value you give to property Data. That is to say, using EAN-13 VB.NET Generator, you only have to place 12 digits of numeric characters in the string value of Data.

For example, if "123456789012" is to be encoded, there will be 13 digits on the image ("1234567890128"), the last digit ("8") is the check digit EAN-13 VB.NET Generator automatically generates and calculates for you.

Sample usage:

Dim ean13 As OnBarcode.Barcode.Linear = New OnBarcode.Barcode.Linear

ean13.Type = OnBarcode.Barcode.BarcodeType.EAN13

ean13.Data = "123456789012"

Sample image:



 

Data Character Set for EAN-13 VB.NET Generator

Encode Numeric Character in EAN-13 barcode image

The characters in EAN-13 are numeric. Only numbers 0 through 9 are valid for EAN-13. The data encoded in the EAN-13 in your VB.NET project is defined by property Data. The value of Data is string value.

Sample usage:

ean13.Data = "123456789012"

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-13 beside its main barcode to supplement the data. When 2-digit add-on is needed, the type should be changed from EAN13 to EAN13_2. Besides, supplement data should be given to property SupData, shown in following Sample usage.

Sample usage:

Dim ean13 As OnBarcode.Barcode.Linear = New OnBarcode.Barcode.Linear

ean13.Type = OnBarcode.Barcode.BarcodeType.EAN13_2

ean13.Data = "123456789012"

ean13.SupData = "12"

Sample image:



Encode 5 digits in EAN-13 Add-on

Similarly, 5-digit add-on symbol could be used in EAN-13 where 2-digit add-on could be placed to encode more supplement data.

Sample usage:

Dim ean13 As OnBarcode.Barcode.Linear = New OnBarcode.Barcode.Linear

ean13.Type = OnBarcode.Barcode.BarcodeType.EAN13_5

ean13.Data = "123456789012"

ean13.SupData = "12345"

Sample image:











OnBarcode is a market-leading provider of barcode imaging generator, reader controls and components for ASP.NET, Windows Forms, WPF, as well Java, Android, iOS (iPhone, iPad) across all major enterprise development platforms. We provides comprehensive tutorials and how-tos for various linear, 2d barcode information, such as C# in ASP.NET, C# .NET, C# Barcode Encoding, C# Barcode Image, VB.NET in ASP.NET, VB.NET Winforms, VB.NET Barcode Encoding. OnBarcode barcode products are supported by RasterEdge ASP.NET Document Viewer, which supports ASP.NET PDF Viewer, ASP.NET MVC Document Viewer, ASP.NET PDF Editor, MVC PDF Viewer. And provide high quality C# Convert PDF to Tiff, C# Convert PDF to Word, C# Convert PDF to HTML, C# Convert PDF to Jpeg images, and their easy and simple documents, like C# PDF SDK, C# extract text from PDF, C# Compress PDF, Print PDF in C# and C# extract image from PDF.
Terms of Use | Privacy Policy
Copyright © OnBarcode.com . All rights reserved.