VB.NET GS1-128 Generator Data Encoding Tutorial

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


 

Setup GS1-128 VB.NET Generator

GS1-128, former known as EAN-128, UCC-128, USS-128, is alphanumeric linear barcode developed on Code 128, however, using GS1 standard.




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 GS1-128 barcode size and image in Barcode Generator Control on VB.NET:


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

Dim ean128 As OnBarcode.Barcode.Linear

ean128 = New OnBarcode.Barcode.Linear

ean128.Type = OnBarcode.Barcode.BarcodeType.EAN128

 

Select Data for GS1-128 VB.NET Generator

There are three code sets of GS1-128. They are code set A, code set B, and code set C. GS1-128 in different code set encodes different types of data character.

Generate GS1-128 with Numeric Character

GS1-128 is capable of encoding number 0 to 9. Sample Usage:

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

ean128.Type = OnBarcode.Barcode.BarcodeType.EAN128

ean128.Data = "123"

Create GS1-128 using Uppercase Letters

GS1-128 encodes uppercase letters A-Z.

Sample Usage:

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

ean128.Type = OnBarcode.Barcode.BarcodeType.EAN128

ean128.Data = "ABC"

Print GS1-128 using Lowercase Letters

Lowercase a-z could also be encoded in GS1-128.

Sample Usage:

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

ean128.Type = OnBarcode.Barcode.BarcodeType.EAN128

ean128.Data = "abc"

Make GS1-128 using using Punctuations

GS1-128 encodes - (Dash),. (Point), $ (Dollar), / (Slash), + (Plus) % (Percentage), and (Space).

Sample Usage:

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

ean128.Type = OnBarcode.Barcode.BarcodeType.EAN128

ean128.Data = "+-"

 

Process Tilde in GS1-128

If you want to use the tilde character "~" to specify special characters in the input data, please set property ProcessTilde to be true.

1-byte character: ~0dd/~1dd/~2dd (character value from 000 ~ 255); ASCII character '~' is presented by ~126 Strings from "~256" to "~299" are unused

2- byte character (Unicode): ~6ddddd (character value from 00000 ~ 65535) Strings from "~665536" to "~699999" are unused

Sample Usage:

ean128.ProcessTilde = True

 

Valid length for Data in GS1-128 VB.NET Generator

GS1-128 Data Length

GS1-128 is variable length symbology, which easily encodes data at any length.

Data Length in GS1-128 VB.NET Generator

The value of property Data, which is used to define the data in GS1-128, is a string value. You can input data at any length in the string.

Sample Usage:

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

ean128.Type = OnBarcode.Barcode.BarcodeType.EAN128

ean128.Data = "1"

Sample Usage:

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

ean128.Type = OnBarcode.Barcode.BarcodeType.EAN128

ean128.Data = "12345678"









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.