Our Customers
Contact Us Email: support@barcodelib.com
Home > .NET Barcode > C# Barcode Generation Guide > C#.NET GS1-128/EAN-128 Generator Component Tutorial
Download Barcode for .NET Suite Trial

GS1-128 Generator Library for .NET in C# Class

How to Generate & Draw GS1-128 Barcodes in .NET with C# Class
  • Mature GS1-128 barcode generator Component for C#.NET in use for more than 10 years
  • Written in managed C#, supporting .NET Framework 2.0 and greater
  • Easy to install C#.NET barcode generator dll library into .NET developments
  • Generate GS1-128 barcode in ASP.NET & Windows software with C#.NET
  • Draw GS1-128 image in Reporting Services & Crystal Report & RDLC Reports
  • Able to output generated GS1-128 barcodes to several C# objects
C#.NET Linear GS1-128 Barcode Overview
GS1-128 (UCC/EAN 128) is a high-density linear barcode. Derived from Code 128, GS1-128 has similar symbol structure and similar encodable data. But different from Code 128, GS1-128 could not only encode data but the meanings that the data has carried. Through using a serial of Application Identifiers, GS1-128 could encode information like production date, weight or something else.
Guide to Generate GS1-128 Images in C#.NET Class
  1. Add our C#.NET barcode generator dll to your project reference.
  2. Add our C#.NET barcode generator dll to your Toolbox item.
  3. Now, you may generate GS1-128 barcode with following sample C# codes.
     BarcodeLib.Barcode.Linear gs1 = new BarcodeLib.Barcode.Linear();
gs1.Type = BarcodeType.EAN128;
gs1.Data = "~ai211121211";

gs1.ProcessTilde = true;
gs1.BarColor = System.Drawing.Color.Blue;
gs1.BarWidth = 2;
gs1.LeftMargin = 12;
gs1.RightMargin = 12;

// More GS1-128 barcode settings here, like image color, font, human-readable text font etc.

// Save barcode image into your system

// Encode GS1-128 barcode & output to byte array
byte[] barcodeInBytes = gs1.drawBarcodeAsBytes();

// Draw GS1-128 barcode to Graphics object
Graphics graphics = ...;

// Create GS1-128 barcode and output to HttpResponse object
HttpResponse response = ...;

// Encode GS1-128 barcode and output to Stream object
Stream stream = ...;
Above free GS1-128 sample codes are written in Visual C# 2005
Guide to Create GS1-128 Barcodes in C# ASP.NET Web Project
  1. Add Barcodelib.Barcode.ASP.NET.dll to your web project.
  2. Or add Barcodelib.Barcode.ASP.NET.dll to the Toolbox.
  3. Open the folder barcode in the downloaded trial package and copy files "linear.aspx", "linear.aspx.cs" to your project folder.
  4. Drag LinearASPNET from the Toolbox and drop it on the split part of your aspx page. Then you will see a barcode image. (Note: this barcode generation SDK default barcode image is Code 128.)
  5. Click the produced barcode image and change barcode type to EAN 128 in the Properties Window or generate a GS1-128 barcode with above C# barcoding sample code.
Guide to Generate GS1-128 Barcodes in C# WinForms Project
  1. Add BarcodeLib.Barcode.WinForms.dll from the trial package to your Windows Forms project.
  2. Or Add BarcodeLib.Barcode.WinForms.dll to your Visual Studio Toolbox.
  3. Drag LinearWinForm to your windows form and click generated image. Then, adjust its barcode type to EAN 128 in the Properties Window or create a GS1-128 image with above C# barcoding sample code.
Barcode Images Supported by C#.NET Barcode Generator DLL
C# 1D Barcode Generation:
C# 2D Barcode Generation:
Generate Linear Barcodes with C#.NET Barcode Generator Control: Codabar, Code 11, Code 2 of 5, Code 39, Code 93, EAN-8, EAN-13, Interleaved 2 of 5, ITF-14 (UPC Shipping Container Symbol), Code 128, EAN 128/GS1 128, MSI Plessey, Intelligent Mail, Planet, Postnet, RM4SCC (British Royal Mail), UPC-A, UPC-E.
Generate 2D Barcodes with C#.NET Barcode Generator Control: Data Matrix, PDF 417, QR Code.