We all know that a barcode is a graphic symbol for identifying products. GS1 128 Barcodes are very common in the retail industry. The GS1-128 standard facilitates data exchange between companies worldwide. Essentially, it’s an eCommerce technology standard for providing accurate and reliable information about a product. In this article, we will learn how to generate GS1 code 128 barcodes. After following the mentioned steps, we will have our own GS1 128 barcode generator in C#. So let’s begin.
The article shall cover the following topics:
- C# GS1 128 Barcode Generator API
- What is GS1 Code 128 Barcode?
- Understanding the GS1 128 Barcode
- Generate GS1 128 Barcode in C#
- Generate UPC-A GS1 128 Coupon
- Customize Barcode Appearance
C# GS1 128 Barcode Generator API
The BarcodeGenerator class of the API allows generating barcodes of the specified EncodeType. The EncodeType class allows specifying the type of barcode to encode. We can save the generated barcode image using the Save(string) method of this class.
PM> Install-Package Aspose.BarCode
What is GS1 Code 128 Barcode?
The GS1 code 128 (formerly UCC/EAN-128) barcode is a machine-readable product identification code that stores data and provides information on products. This code is applied to packs and containers of goods to help facilitate the efficient distribution and usage of foodstuffs.
Thousands of industries worldwide use the GS1 barcode or Global Trade Item Number (GTIN). Customers and suppliers worldwide know GS1-128 barcodes for food, pharmaceuticals, and other commodities. It serves as an inventory management tool for manufacturers, retailers, and consumers. The GS1-128 codes are defined by the International Organization for Standardization (ISO) and published by the GS1 organization.
Understanding the GS1 Code 128 Barcode
The GS1-128 barcode follows the following format:
The GS1-128 barcode contains the following helpful information:
- GTIN (Global Trade Item Number)
- Serial numbers
- Batch and lot numbers
- Product dates
- Origin and destination of the product
- Nature of the product
Generate GS1 128 Barcode in C#
We can easily create a GS1 128 barcode generator in .NET and generate GS1 code 128 barcodes by following the steps below:
- Firstly, create an instance of the BarcodeGenerator class with the EncodeType as an argument.
- Next, specify the text to encode.
- After that, set the barcode size value in pixels.
- Finally, save the output using the Save() method. It takes the output file path as an argument.
The following code example shows how to generate a GS1 code 128 barcode in C#.
Generate UPC-A GS1 128 Coupon in C#
Similarly, we can generate a barcode label with an additional GS1-128 coupon barcode placed in the same image by following the steps mentioned earlier. However, we need to set the EncodeType as UpcaGs1Code128Coupon in the first step.
The following code example shows how to generate a UPC-A GS1 Code 128 Coupon in C#.
Customize GS1 128 Coupon Appearance in C#
We can also customize the appearance of the barcode by following the steps mentioned earlier. However, we need to specify additional properties before saving the image in the final step.
The following code example shows how to customize the barcode appearance of GS1 128 Coupon in C#.
Get a Free License
You can get a free temporary license to try the library without evaluation limitations.
GS1 Code 128 Barcode Library - Learning Resources
Besides generating GS1 code 128 barcodes, you can learn more about various other features of Aspose.BarCode using the resources given below:
In this article, we have learned about GS1 128 barode and how to generate a GS1 code 128 barcode in C#. We have also seen how to generate UPC-A GS1-128 coupon programmatically. By following the steps outlined in this article, you can have your own customized GS1 128 barcode generator application. In case of any ambiguity, please feel free to contact us on our free support forum.