// Create PDF417 barcode object in C#
PDF417 barcode = new PDF417();
// Set PDF-417 barcode value in C#
barcode.CodeText = "PDF417 in C#";
// set unique PDF 417 barcode image settings
barcode.ColumnCount = 3;
barcode.RowCount = 10;
barcode.X = 3;
barcode.XtoYRatio = 0.3333333f;
// set image size-related property settings
barcode.BottomMargin = 6;
barcode.TopMargin = 6;
barcode.RightMargin = 6;
barcode.LeftMargin = 6;
// Set PDF-417 drawing image format to PNG in C#
barcode.Format = System.Drawing.Imaging.ImageFormat.Png;
// Generate PDF-417 barcode & encode to the png image in C#
barcode.drawBarcode("C://barcode-pdf417.png");
' Create PDF417 barcode object in VB.NET
Dim barcode As New PDF417()
' Set PDF-417 barcode value in C#
barcode.CodeText = "PDF417 in VB.NET"
' set unique PDF 417 barcode image settings
barcode.ColumnCount = 3
barcode.RowCount = 10
barcode.X = 3
barcode.XtoYRatio = 0.3333333F
' set image size-related property settings
barcode.BottomMargin = 6
barcode.TopMargin = 6
barcode.RightMargin = 6
barcode.LeftMargin = 6
' Set PDF-417 drawing image format to PNG in VB.NET
barcode.Format = System.Drawing.Imaging.ImageFormat.Png
' Generate PDF-417 barcode & encode to the png image in VB.NET
barcode.drawBarcode("C://barcode-pdf417.png")
Barcode properties | HTTP Parameters | Default | Comments |
---|---|---|---|
CodeText | code-text | "" | The data that is used to encode into PDF417 symbology. PDF417 symbology standards defines three data compaction modes to encode text, binary, and numbers. The encodable character set of PDF417 consist of:
|
GraphicsUnit | graphics-unit | GraphicsUnit.Pixel | The unit of measurement for all size related settings.
|
X | x | 1 | The width of narrowest bar module of PDF417 symbol and the default value of X dimension is 1 pixels.
The minimum width of a module, the X dimension, should be defined by the application specification |
XtoYRatio | x-y-ratio | 3 | The ratio of the width of a module (X Dimension) to row height (Y). Valid ratio of X to Y ranges from 1:2 to 1:5, however, the recommended X to Y ratio is 1:3. Other popular ratios include 1:4 and 1:5. |
LeftMargin | left-margin | 0 | The property to set the distance between the symbol and the left margin of a barcode image. |
RightMargin | right-margin | 0 | The property to set the distance between the symbol and the right margin of a barcode image. |
TopMargin | top-margin | 0 | The property to customize the space between the symbol and the top margin on a barcode image |
BottomMargin | bottom-margin | 0 | The property to change the space between the symbol and the bottom margin on a barcode image |
Resolution | resolution | 72 | This property set the resolution in DPI of a barcode image to be drawn, and the default value that is set to printer is 72 pixels. You can adjust the value to get a custom resolution barcode image. |
Rotate | rotate | 0 | The Rotate property allows you changing the angle of a barcode. The valid values are:
|
Format | format | ImageFormat.Png | This is a method that is used for exporting barcode to different type of image formats. It allows developers generate barcode in formats like JPEG/JPG, BMP, GIF, and PNG.
The default method is ImageFormat.Png. Image format type. Using System.Drawing.Imaging.ImageFormat |
ProcessTilde | process-tilde | false | Set the processTilde property to true, if you want use the tilde character "~" to specify special characters in the input data. Default is false.
~NNN: is used to represent the ASCII character with the value of NNN. NNN is from 000 - 255. |
DataMode | data-mode | PDF417DataMode.Text | The data compaction modes of PDF417 symbology
|
ECL | ecl | PDF417ECL.ECL_2 | Error Correction Level. PDF417 uses different error correction levels to compensate for defects in the label and misreads in the decoding process. The values of PDF417 error correction levels range from 0 to 8 and the recommended level is 2. Default value is PDF417ECL.ECL_2 (2). |
RowCount | row-count | 3 | The number of rows of a PDF417 barcode is selectable. Valid number of rows of a PDF417 symbol ranges from 3 to 90. The default value is 3 rows. |
ColumnCount | column-count | 5 | This is the number of columns of a PDF417 symbol. The amount of columns of a PDF417 symbol can be up to 30. The default number is 5 columns. Increase this value if your data size is large. |
Truncated | truncated | false | Truncated PDF417, or Compact PDF417, reduces the right hand side of the symbol to improve the symbol density. This option is selected when the barcode is used where space considerations are a primary concern and symbol damage is unlikely. |
Macro | macro | false | The Macro PDF417. If a very large amounts of data message need to be encoded into a PDF417 symbol, you can set the Macro property to be true, then Macro PDF417 is enabled. |
MacroSegmentIndex | macro-segment-index | 0 | The position of current symbol in the MacroPDF417 sequence. Each barcode in the sequence is assigned a unique segment index, whose number starts from 0 to 99998. |
MacroSegmentCount | macro-segment-count | 0 | The number of total symbols which make the sequence. |
MacroFileIndex | macro-file-index | 0 | The MacroFileIndex is used to assign a file ID to the MacroPDF. For each related Macro PDF417 symbol, the file ID field contains the same value. |