PDF 417 (Portable Data File 417) is a
stacked symbology and was invented by Ynjiun Wang in 1991 at Symbol
Technologies. PDF 417 consists of 17 modules each containing 4 bars
and spaces. PDF417 also utilizes Reed-Solomon error correction
routines, enabling damaged symbols to be reconstructed. The
symbology is capable of encoding the entire (255 character) ASCII
set as well as 2725 data characters in a single barcode.
Use Caret (^)
The UseCaret propeties is set to true by default which is only
apply to Code128, UccEan128, Sscc18, Scc14, PDF417, MacroPDF417, QR
Code, and DataMarix etc. where full ASCII is accepted as encoding.
The 3 digits data following the caret will be treated as ASCII
code, e.g. ^010 is \n; ^009 is a tab; ^065 is character 'A'.
PDF 417 Properties
Besides the properties to general barcode, the following properties
belongs to PDF 417 only:
PDF417BarWidth gets or sets the narrow
bar size in inches for PDF 417. Default is 0.01 inch.
Pdf417CompactionType gets or sets the PDF
417 compaction type. Default is Binary encoding. Four type of modes
available:
- Binary: it is used to encode all 256 8-bit byte values.
- Numeric: it is used to encode numeric data.
- Text: it is used to encode all printable ASCII character
data.
- Auto: it switches between the other three encoding method for
small size.
PDF417YtoXRatio gets or sets the height
of PDF 417 cell in the size of narrow bar (X Dimension). Default is
3.0.
PDF417Rows gets or sets the number of
rows in the PDF417 barcode. Default is 0 (auto).
PDF417Columns gets or sets the number of
columns in the PDF417 barcode. Default is 0 (auto).
Pdf417ErrorCorrectionLevel gets or sets
the level of error correction used to create the barcode. The level
is from 0 to 8. Default is Level2.
PDF417BarWidth gets or sets the narrow
bar width size in inches for PDF417. Default is 0.01.
Pdf417Truncated determines if the right
side of PDF417 barcode is truncated (removed) version which removes
the right-hand portion in order to save space. Default is
false.
PDF 417 examples by using ezBarcodeComponent
[C#]
using ezBarcodeComponent.Winform;
//create barcode class
Barcode barcode1 = new Barcode();
//Specify the CodeData to encode
barcode1.CodeData = "0123456789";
//Set the Symbology to Codabar
barcode1.Symbology = Symbologies.PDF417;
barcode1.UseCaret= true;
//Save the image
barcode1.SaveImageAs("PDF417.gif", System.Drawing.Imaging.ImageFormat.Gif);
[Vb.net]
'create barcode class
Dim barcode1 As New Barcode
'Specify the CodeData to encode
barcode1.CodeData = "0123456789"
'Set the Symbology to Codabar
barcode1.Symbology = Symbologies.PDF417
barcode1.UseCaret= True
'Save the image
barcode1.SaveImageAs("PDF417.gif", System.Drawing.Imaging.ImageFormat.Gif)
Example of PDF 417 barcode images.