Setting ITF-14 Barcode Size in C#

C# ITF-14 Barcode Size Setting

To help users have a better understanding about setting ITF-14 image size, OnBarcode offers details of ITF-14 size setting in C#.

Users can simply set ITF-14 barcode size using the OnBarcode products below:

ITF-14 Structure

  • W : the symbol width of ITF-14
  • Q : the width of quiet zone on either side, Q min = 10X.
  • P : the number of character pairs
  • B : the width of the bearer bar
  • X : the width of a narrow element
  • N : the wide-to-narrow ratio



Setting ITF-14 Barcode Size in C#

Basic information you should know

ITF-14 barcode width, W (measured in pixel), including quiet zones, can be computed from the expression below:

W = 2Q + 29NX + 48X + 2B

You can adjust ITF-14 barcode height in C# ITF-14 generator through Top and Bottom Margin settings according to your applications.


Three Situations for Setting ITF-14 Barcode Size in C#

Setting ITF-14 barcode size in C# ITF-14 Generator may have three situations:

Situation 1:

If you want to create a ITF-14 with a minimum X, please do as below:
  • Set the minimum value of X.
  • Set the AutoResize option to be false.
  • Customize other properties.
Eg1. Set in C# ITF-14 generator:
itf14.X = 2;
itf14.N = 2.5;
itf14.BearerBarVert= 2;
itf14.BearerBarHori= 2;
itf14.AutoResize = false;
Other properties: default;
The generated ITF-14 image is:


Situation 2:

If you want to generate an ITF-14 with a fixed barcode image width (W), and try to draw maximum barcode module (X) as possible, please do as follows:
  • Set the fixed value of barcode image width (W).
  • Set the AutoResize option to be true.
  • Customize other properties.
Eg2. Set in C# ITF-14 generator:
code39.BarcodeWidth = 300;
itf14.N = 2.5;
itf14.BearerBarVert= 2;
itf14.BearerBarHori= 2;
itf14.BarcodeHeight = 60;
code39.AutoResize = true;
Other properties: default;
The generated ITF-14 image is:

In the above ITF-14 image, the bar module (X) is 2 pixel, which is the maximum bar module.


Situation 3:

If you want to generate a ITF-14 with minimum X and fixed barcode image width (W), please do as below:
  • Set the values of minimum X and barcode image width (W).
  • Set the AutoResize option to be false.
  • Customize other properties.
Eg3. Set in C# ITF-14 generator:
itf14.X = 3;
itf14.BarcodeWidth = 200;
itf14.AutoResize = false;
Other properties: default;
The generated ITF-14 image is:


Note that, once you have set bar module (X) value, there will be a minimum barcode image width defined by ITF-14 GS1 specification.

ITF-14 minimum barcode image width (W min) is:

= 2Q + 29NX + 48X + 2B

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:

itf14.X = 2;
itf14.N = 2.5;
itf14.BarcodeWidth = 280;
itf14.BearerBarVert= 2;
itf14.BearerBarHori= 2;
itf14.BarcodeWidth = 100;
itf14.AutoResize = false;
Other properties: default;
Then ITF-14 barcode minimum width (W min) is:
= 2*10*2 + 29*2.5 + 48*2 + 2*2*2
= 289 pixel

Now your BarcodeWidth setting is 100 pixel, which is less than the minimum barcode width, the component generated ITF-14 image will be like this.


If your BarcodeWidth setting is 350 pixel, which is larger than the minimum barcode width (289 pixel), the generated ITF-14 image will be like below. And extra 30.5 pixel space has been added to the left and right side of barcode image.






OnBarcode is a market-leading provider of barcode 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 high quality tutorials and guides for various linear, 2d barcode information, such as C# Barcode, QR Code C#, QR Code VB.NET, QR Code ASP.NET, QR Code .NET, ASP.NET Barcode. 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.