- Home
- Products
- Integration
- Tutorial
- Barcode FAQ
- Purchase
- Company
|
Setting GS1-128 Barcode Size in C#Controling GS1-128 Barcode Size in C#
OnBarcode provides professional GS1-128 generation components for ASP.NET, C#, VB.NET applications.
GS1-128 Structure
Setting GS1-128 Barcode Size in C#Basic information you should know
The width W of a GS1-128 symbol, including quiet zones, can be calculated from the following expression:
GS1-128 barcode height is user-defined. So you can adjust the barcode height through Top and Bottom Margin settings in C# GS1-128 generator according to your applications.
Three Situations for Setting GS1-128 Barcode Size in C#
Setting GS1-128 barcode size in C# GS1-128 Generator may have three situations:
Situation 1:
If you want to create a GS1-128 with a minimum X, please do as below:
Situation 2:
If you want to generate a GS1-128 with a fixed barcode image width (W), and try to draw maximum barcode module (X) as possible, please do as follows:
Situation 3:
If you want to generate a GS1-128 with minimum X and fixed barcode image width (W), please do as below:
Note that, once you have set bar module (X) value, there will be a minimum barcode image width defined by GS1-128 ISO specification.
GS1-128 minimum barcode image width (W min) is:
So if your BarcodeWidth value is less than the minimum barcode width, the barcode generator component will reset BarcodeWidth value to the minimum barcode width value.
For example, you set: Now your BarcodeWidth setting is 200 pixel, which is less than the minimum barcode width, the component generated GS1-128 image will be like this. If your BarcodeWidth setting is 320 pixel, which is larger than the minimum barcode width (297 pixel), the generated GS1-128 image will be like below. And extra 11.5 pixel space has been added to the left and right side of barcode image. |