PDF417 is a high-capacity 2D symbology.
The following properties are specific to the UltraPdf417Barcode™ symbology:
The PDF417 error correction level is calculated on the following properties:
If UseMinimumErrorCorrectionLevel is set to True (by default) and the minimum error correction level for the current Data code words number is higher than the set ErrorCorrectionLevel value (Level0 by default), then the minimum level is used by the control. If the ErrorCorrectionLevel is set to a higher level than the calculated minimum error correction level, then the set ErrorCorrectionLevel has a priority.
The encoding algorithm of the PDF417 is selected by the EncodingMode property of the control. If the property is set to Undefined (the default value), the control chooses the best algorithm and sometimes mixes them to encode the Data value in the most compact way. If there is an EncodingMode set that is not suitable for the data, an error message is displayed:
In Visual Basic:
Dim Barcode As New UltraPdf417Barcode() Barcode.Data = "xamBarcode" Barcode.EncodingMode = CompactionMode.Numeric
In C#:
UltraPdf417Barcode Barcode = new UltraPdf417Barcode(); Barcode.Data = "xamBarcode"; Barcode.EncodingMode = CompactionMode.Numeric;
The PDF417 matrix is defined by different criteria which are verified in the following order:
If the Columns/Rows property is set, the control checks if the Data and Error Correction code words can be encoded in this cells number, otherwise an error is displayed. Note that PDF417 encodes up to 928 code words. If the combinations of Columns and Rows results in more than 928 cells, an error is generated.
If the Columns and Rows properties are not set, the control checks if the AspectRatio is specified and uses it to create the matrix size depending on the WidthToHeightRatio.
If none of the above are set, the control chooses the best combination of column and row numbers to fit the Data and the Error Correction code words into the matrix with an aspect ratio closest to the default one – 0.5.
If the user has explicitly set some of the above-mentioned properties, the defined matrix might not be suitable for the data – this will cause the UltraPdf417Barcode control to display a corresponding error message:
In Visual Basic:
Dim Barcode As New UltraPdf417Barcode() Barcode.Data = "xamBarcode" Barcode.Rows = 3 Barcode.Columns = 3
In C#:
UltraPdf417Barcode Barcode = new UltraPdf417Barcode(); Barcode.Data = "xamBarcode"; Barcode.Rows = 3; Barcode.Columns = 3;
In Visual Basic:
Dim Barcode As New UltraPdf417Barcode() Barcode.Data = "PDF 417"
In C#:
UltraPdf417Barcode Barcode = new UltraPdf417Barcode(); Barcode.Data = "PDF 417";