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-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-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-128 Barcode?
GS1-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-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 generate a GS1-128 barcode by following the steps given 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-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.
In this article, we have learned about GS1-128 barode and how to generate a GS1-128 barcode in C#. We have also seen how to generate UPC-A GS1-128 coupon programmatically. Besides, you can learn more about Aspose.BarCode for .NET API using documentation. In case of any ambiguity, please feel free to contact us on our free support forum.