C#. PDF-417 Generator Size Setting Tutorial

sample source code to generate 2D PDF-417 images and adjust barcode size in C# .NET


  • Create, draw & render PDF-417 barcodes as well Truncated PDF-417 and Macro PDF-417 barcodes in Visual C#.NET development environments
  • Easy to encode all ASCII characters using 5 different data modes
  • Simple to customize PDF-417 row and column numbers
  • Support 8 different Error Correction level for PDF-417 barcodes
  • Full-featured PDF-417 barcode size, color, image properties provided
  • Compatible with the latest PDF-417 barcodes specification - ISO / IEC 15438 (2nd edition 2006-06-01)
  • Powerful, perfect C#.NET Barcode Generation Component for PDF-417
  • Tutorial for PDF-417 Image Setting in Visual C#.NET
  • Tutorial for PDF-417 Data Encoding in Visual C#.NET

PDF-417, also known as Portable Data File 417, PDF 417, PDF417 Truncated, is a stacked linear barcode symbol format used in a variety of applications.

 

PDF-417 Structure



PDF-417 Image Width Related Settings

W: the width of PDF-417 image (including quiet zone). Please see BarCodeWidth.

X: the width of PDF-417 module. Xmin=1 pixel. Please see X.

C: the number of columns in the symbol in the data region (excluding start, stop and row indicator codewords) (1<=C<=30). Please see Column Count.

Q: the width of the quiet zone; Qmin=2X. Please see Left & Right Margin.

PDF-417 Image Height Related Settings

H: the height of PDF-417 image (including quiet zone). Please see BarCodeHeight.

R: the number of rows in the symbol (3<=R<=90). Please see Row Count.

Top & Bottom Margin: the height of the top & bottom quiet zone. Please see Top & Bottom Margin.



 

Setting PDF-417 Barcode Size in C#

C# PDF-417 barcode provides a set of barcode size settings to specify you PDF-417 barcodes. Please download C# barcode component and install, copy those following code to your Visual Studio:

PDF417 barcode = new PDF417();

barcode.PDF417DataMode = PDF417DataMode.Auto;

barcode.Data = "ONBARCODE";

Modify your PDF-417 barcodes by setting those following properties:

UOM

UOM is short for Unit of Measure, which is the unit of meature for all size related settings in the library. C# PDF-417 barcode provides 3 options: Pixel, Cm, and Inch. The default is Pixel.

barcode.UOM = UnitOfMeasure.PIXEL;

Colum & Row Count

RowCount is the number of rows for PDF417. The value range is from 3 to 90. The default is 3 (float).

ColumnCount is the number of columns. The value range is from 1 to 30. The default is 5(float). Increase this value, if your data size is large.

barcode.RowCount = 9;

barcode.ColumnCount = 12;

PDF-417 X to Y Ratio

RowCount is the proportion of bar width and bar height. The default is 0.3333333f (float)

barcode.XtoYRatio = 0.222222f;

Barcode Width & Height

BarcodeWidth is the PDF-417 barcode image width. The default in C# PDF-417 barcode is 0 (float).

BarcodeHeight is the PDF-417 barcode image height. The default in C# PDF-417 barcode is 0 (float).

barcode.BarcodeWidth = 0;

barcode.BarcodeHeigth =0;

Notice: if your setting is smaller than the barcode required minimum width and height, the library will automatically reset to barcode minimum width. Or you may enable AutoResize to automatically resize your PDF-417 barcode image.

Barcode Margin

BarcodeMargin is the white zone around the PDF-417 symbol. C# PDF-417 barcode provides 4 options: Left Margin, Right Margin, Top Margin and Bottom Margin. The default of these four margins are 0 (float).

barcode.TopMargin = 3;

barcode.BottomMargin = 3;

barcode.LeftMargin = 1;

barcode.RightMargin = 1;

X

X is the width and height of barcode bar module. The default in C# PDF-417 barcode is 2 (float).

barcode.X = 3;







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.