Our Customers
Contact Us Email: support@barcodelib.com
Home > .NET Barcode > C# Barcode Creation Guide > How to Generate & Draw GS1 Compatible Barcode in C#.NET Applications
Download Barcode for .NET Suite Trial

How to Generate GS1 Barcodes Using C#.NET Class Codes

Professional GS1 Barcode Generator Used for C#.NET Class Applications
  • Mature & cost-effective C#.NET barcoding SDK for GS1 barcode generation
  • Generate & print GS1 barcode types using simple C#.NET class codes
  • Create & save generated GS1 barcodes to several image files using C#
  • Flexible to adjust image properties of created GS1 barcodes in C#.NET projects
  • Support generating linear GS1-compatible barcodes using C# class, like EAN-128 & ITF-14
  • Support creating 2d GS1-compatible barcodes using C# class, like QR Code & Data Matrix
Overview - GS1 Compatible Barcodes
GS1 (Global Standards One) compatible barcodes are used to identify & define items in the global supply chain. Those barcode types make sure that your barcode numbers are unique enough to distinguish yourself from other numbers. Thus, GS1-compatible barcodes are indispensable for today's international trade business.
How to Generate GS1 Barcodes Using C# Code
Our C#.NET Barcode Generator makes it extremely easy for you to generate GS1-compatible barcodes in C#.NET applications. What you need to do is to install the barcoding dll to your C#.NET project and copy-&-paste those free sample C# codes below.

How to Install C#.NET Barcode DLL

In the following section, we will list free sample C# code on how to generate 2d GS1 barcode types. And we will take C# QR Code barcode generation and C# Data Matrix barcode generation as examples.
C# GS1 2D Barcode Generation - QR Code
     // Generate & print QR Code image using C#
     BarcodeLib.Barcode.QRCode qrcode = new BarcodeLib.Barcode.QRCode();
     qrcode.Encoding = BarcodeLib.Barcode.QRCodeEncoding.Auto;
     qrcode.Data = "(12)345678945612";
     qrcode.ModuleSize = 2;
     qrcode.LeftMargin = 8;
     qrcode.RightMargin = 8;
     qrcode.TopMargin = 8;
     qrcode.BottomMargin = 8;

     // Activate GS1-compatible barcoding function
     qrcode.FNC1Mode = QRCodeFNC1Mode.FirstPosition;

     // Output generated GS1-compatible QR Code image to png image format file
C# GS1 2D Barcode Generation - Data Matrix
     // Generate standard Data Matrix using C#
     BarcodeLib.Barcode.DataMatrix  datamatrix = new BarcodeLib.Barcode.DataMatrix ();
     datamatrix.Data = "(12)345678945612";
     datamatrix.ModuleSize = 3;
     datamatrix.LeftMargin = 3;
     datamatrix.RightMargin = 3;
     datamatrix.TopMargin = 3;
     datamatrix.BottomMargin = 3;

     // Generate GS1-compatible Data Matrix barcode image
     datamatrix.FNC1Mode = DataMatrixFNC1Mode.FirstPosition;

     // Draw created GS1-compatible Data Matrix to your system

C# GS1 Compatible Linear Barcodes Generation

Besides those 2d barcode types, our C#.NET barcode generator also supports linear GS1-compatible barcode types, like EAN-128/GS1-128 in C# and ITF-14 in C#.
C# GS1 1D Barcode Generation - EAN-128/GS1-128
     // Generate GS1-compatible EAN-128 barcode
     BarcodeLib.Barcode.Linear ean128 = new BarcodeLib.Barcode.Linear();
     ean128.Type = BarcodeType.EAN128;
     ean128.Data = "~ai211121211";
     ean128.ProcessTilde = true;
     ean128.BarWidth = 3;

     // Output created GS1-compatible EAN-128 barcode image to your system
C# GS1 1D Barcode Generation - ITF-14
     // Create & print GS1-compatible linear ITF-14 barcode
     Linear itf14 = new Linear();
     itf14.Type = BarcodeType.ITF14;
     itf14.Data = "1234567891234";
Barcode Generation Guide for Other .NET Projects
All Supported Barcode Types
C# Linear Barcodes:
C# Matrix Barcodes: