pdf-417

The pdf-417 bar code type is a stacked bar code in which characters are coded in code words. A code word consists of 17 units, each consisting of 4 strokes and 4 spaces.

Pdf-417 can be used to encode text and binary data of variable length. It is possible to encode up to 925 code words (minimal error correction degree). Text, binary data and numeric data are compressed into code words so that the limits for these types are:

  • 1850 ASCII characters
  • 1108 Byte values
  • 2710 numeric values

The limits for mixed text are lower, as control characters are inserted to switch between the different compression modes.

Setting the error correction degree to the recommended minimum lowers the maximum number of encodable code words to 863 yielding these limits for the encodable types:

  • 1726 ASCII characters
  • 1033 Byte values
  • 2528 numeric values

The conversion of the data specified in the codeValue attribute to the internal representation is done by an algorithm that minimizes space (Sometimes there is more than one option to encode a particular piece of data). Non-ASCII characters are encoded using the specified encoding table. Byte values that cannot be represented in an XML document (for example all characters lower 0x20 except 0x9, 0xa and 0xd) can be represented by a backslash ('\') character followed by a 3 digit octal literal. The backslash character itself can be escaped by a sequence of two backslash characters.