- Home
- Products
- Integration
- Tutorial
- Barcode FAQ
- Purchase
- Company
|
Setting PDF-417 Barcode Size in C#Creating and Customizing PDF417 Barcodes in C#
OnBarcode provides explanation of how to set PDF417 image size in Java, .NET, Android developments. And customers are entitled to adjust PDF417 barcode size using the products below.
PDF-417 Generator ComponentsPDF-417 Scanner ComponentsPDF-417 Generator & Scanner SoftwarePDF-417 Structure
Setting PDF-417 Barcode Size in C#Basic information you should know
The width W of a PDF417 symbol, including quiet zones can be calculated from the following expression:
The Height of a PDF417 symbol, including quiet zones can be calculated from the following expression:
Three Situations for Setting PDF417 Barcode Size in C#
Setting PDF417 barcode size in C# PDF417 Generator may have three situations:
Situation 1:
If you want to create a PDF417 with a minimum X, please do as below:
Situation 2:
If you want to generate a PDF417 with a fixed barcode image width (W)and height (H), and try to draw maximum barcode module (X) as possible, please do as follows:
Situation 3:
If you want to generate a PDF417 with minimum X and a fixed barcode image width (W) and height (H), please do as below:
Note that, once you have set bar module (X) value, there will be a minimum barcode image width and height defined by PDF417 specification.
PDF417 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 280 pixel, which is less than the minimum barcode width.And the Barcode Height setting is 20 pixel, which is less than the minimum barcode height. The component will resize the barcode image to the minimum size, so generated PDF417 image will be like this. the component generated PDF417 image will be like this. If your BarcodeWidth setting is 650 pixel, and your BrcodeHeight 50 pixel, which are larger than the minimum barcode width (616 pixel) and the 36 pixel barcode height, the generated PDF417 image will be like below, with an extra 19 pixel space added to horizontal margins, and an extra 7 pixel space added to the vertical margins. , |