The Pdf417 is a 2 dimensional barcode which can encode large amount of text and data. DynamicBarcode Creator supports the Pdf417 barcode through its Pdf417 class.


Compaction specifies the amount of data that can be compacted into codewords to save space. Pdf417 barcodes have three compaction modes: text, byte, and numeric.

DynamicBarcode Creator supports compaction through its Pdf417Compaction enumeration which is provided as a Pdf417 constructor parameter or by setting the Compaction property directly.

Error Correction

A user may define one of 9 error correction levels (levels 0 to Level 8). By specifying an error correction level you can prevent data loss for encoded data. The following table lists error correction codewords count for the selected error correction level.

Error Correction Level Total Number of Error Correction Codewords
0 2
1 4
2 8
3 16
4 32
5 64
6 128
7 256
8 512

DynamicBarcode Creator supports setting the error correction level through the Pdf417ErrorCorrectionLevel enumeration which can be set directly through a constructor in the Pdf417 class or by setting the ErrorCorrectionLevel property directly.

Simple Example

Creating a Pdf417 barcode is straightforward, as the following example illustrates. Note that this example accepts the default encoding and error correction. You can override the defaults by adding the appropriate values when constructing the Pdf417 instance or you can set the values using the Pdf417 provided properties.

Pdf417 barcode = new Pdf417("Hello World",3);
barcode.Draw(pngFilePath, 300, ImageFormat.Png);       
Dim barcode As Pdf417 = New Pdf417("Hello World",3)
barcode.Draw(pngFilePath, 300, ImageFormat.Png)

In this topic