C# GS1-128 / EAN-128 Generator Library SDK

Integration & Developer Guide for GS1-128 / EAN-128 linear barcode image generation in C#

Generate barcode GS1-128 / EAN-128 images in Visual C# .NET with complete sample C# source code






In this tutorial page, you will learn how to create valid GS1-128 barcode data and print to high resolution images using C# in your ASP.NET, Windows applications.

  • GS1-128 supporting character set
  • GS1-128 special characters: FNC1, start and stop chars
  • GS1-128 barcode structure
  • GS1-128 barcode dimension size
  • Complete list of GS1-128 barcode properties in C# class

How to create GS1-128 barcodes using C# in ASP.NET, .NET Core, Windows application

  1. Download .NET Barcode Generator Suite
  2. Install C# library to create GS1-128 barcodes in .NET project
  3. Step by Step Tutorial






























C# GS1-128 / EAN-128 Generator Introduction

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

C# GS1-128 Generator is one of the functions in OnBarcode's Barcode in .NET Generation Controls, which supports generating & printing GS1-128 / EAN-128 and 20+ other linear & 2D bar codes for C# applications.
OnBarcode C# Barcode Generator makes it easy to generate, create GS1-128 and other linear & 2d barcodes in Microsoft Word.
OnBarcode provides several EAN-128 Generator components and software, including GS1 128 .NET, GS1 128 Java, GS1 128 VB.NET, GS1 128 ASP.NET, GS1 128 Generator.
This document is providing a detailed C# source code about generating GS1-128 barcodes in C# class using Barcode in C# generation component. Complete GS1-128 custmoization settings is included in C# GS1-128 generation guide.




GS1-128 Barcode Basic Characteristics in C#

Top

Encodable character set

  • The subset of ISO/IEC 646 International Reference Version defined in these GS1 General Specifications be used for GS1 Application Identifier (AI) element strings.

  • Characters with ASCII values 128 to 255 may also be encoded in Code 128 symbols.

  • Four non-data function characters: FNC1, FNC2, FNC3, FNC4. FNC2 and FNC4 are not used in GS1-128 barcodes.

  • Four code set selection characters (including single character code set shift)

  • Three start characters

  • One stop character
Note: Using C#.NET Barcode Generator library, you shall not add function characters, code set selection characters, start and stop characters. OnBarcode barcode generator library will insert them into the GS1-128 barcode symbol automatically.


GS1-128 check digit character

Same as Code 128, GS1-128 barcode has one mandatory symbol check character. The check digit character will not be displayed in the HRI (human readable interpretation).



In GS1-128 barcode generator C# library, the property AddCheckSum is not applicable. The barcode encoder library will automatically add one check character before the stop character in every GS1-128 barcode symbol.




GS1-128/EAN-128 Barcode Dimension Size in C#

Top
In GS1-128 barcode generator C# library, you may use the following barcode dimension size properties:

  • UOM: Unit of measure. Three options: PIXEL, CM and INCH.

  • X: Width of the narrow element. The mimumum bar width is defined by the application specification

  • Y: Height of the bar module.

  • LeftMargin, RightMargin: Quiet zone. the minimum width of quiet zone is 10X.
C#.NET source code: set GS1-128 barcode image sizes.
            Linear barcode = new Linear();

            // encode two AI element with data message
            barcode.Data = "(00)395123451234567895(01)09501101530003";
            // Barcode symbology type.
            barcode.Type = BarcodeType.EAN128;


            /*
            * Barcode Image Related Settings
            */
            // Unit of meature for all size related setting in the library. 
            barcode.UOM = UnitOfMeasure.PIXEL;
            // Bar module width (X), default is 1 pixel;
            barcode.X = 2;
            // Bar module height (Y), default is 60 pixel;
            barcode.Y = 60;
            // Barcode image left, right, top, bottom margins. Defaults are 0.
            barcode.LeftMargin = 0;
            barcode.RightMargin = 0;
            barcode.TopMargin = 0;
            barcode.BottomMargin = 0;
            // Image resolution in dpi, default is 72 dpi.
            barcode.Resolution = 300;
            // Created barcode orientation.
            //4 options are: facing left, facing right, facing bottom, and facing top
            barcode.Rotate = Rotate.Rotate0;

            /*
            * Linear barcodes human readable text styles
            */
            // Display human readable text under the barcode
            barcode.ShowText = true;
            // Human readable text font size, font family and style
            barcode.TextFont = new Font("Arial", 9f, FontStyle.Regular);
            // Space between barcode and text. Default is 6 pixel.
            barcode.TextMargin = 6;

            // Generate Code-128 and encode barcode to png format
            barcode.Format = System.Drawing.Imaging.ImageFormat.Png;

            barcode.drawBarcode("C://Projects//OnBarcode.com//csharp-gs1-128-barcode-size.png");






GS1 128 barcode property settings in C#

Top
.NET Barcode Generator library has provided 20+ property settings to customize the generated GS1-128 barcode images. You view the complete list of GS1-128 barcode property settings here.




Create GS1-128 / EAN-128 Barcodes in C#

Top
View complate C# generate GS1-128 barcode source code at How to generate GS1-128 using C#




More C# Barcode Generation Tutorials for Each Barcode
Top

Barcode Control for C#.NET - Bar Code Type Generation

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.