- Home
- Products
- Integration
- Tutorial
- Barcode FAQ
- Purchase
- Company
|
Setting Interleaved 2 of 5 Barcode Size in C#Adjusting Interleaved 2 of 5 Barcode Size in C#
OnBarcode provides mature, reliable Interleaved 2 of 5 generation components for ASP.NET, C#, VB.NET, Java, iOS developments and various Report applications.
Interleaved 2 of 5 Structure
Setting Interleaved 2 of 5 Barcode Size in C#Basic information you should know
Interleaved 2 of 5 barcode width, W (measured in pixel), including quiet zones, can be computed from the expression below:
Interleaved 2 of 5 barcode height is user-defined. So you can adjust the barcode height through Top and Bottom Margin settings in C# Interleaved 2 of 5 generator according to your applications.
Three Situations for Setting Interleaved 2 of 5 Barcode Size in C#
Setting Interleaved 2 of 5 barcode size in C# Interleaved 2 of 5 Generator may have three situations:
Situation 1:
If you want to create an Interleaved 2 of 5 with a minimum X, please do as below:
Situation 2:
If you want to generate an Interleaved 2 of 5 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 an Interleaved 2 of 5 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 Interleaved 2 of 5 ISO specification.
Interleaved 2 of 5 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 260 pixel, which is less than the minimum barcode width, the component generated Interleaved 2 of 5 image will be like this. If your BarcodeWidth setting is 340 pixel, which is larger than the minimum barcode width (294 pixel), the generated Interleaved 2 of 5 image will be like below. And extra 46 pixel space has been added to the left and right side of barcode image. |