Technical Specifications - PDF417

PDF417 symbol is an ISO international standard (IEC 15438). You are allowed to use it in your applications.

The PDF417 code is a 2D barcode that can encode large amounts of information within a symbol. All 256 characters can be encoded.
You may use multiple symbols to spread your information in order to create a bigger message.

This barcode contains a way to detect and correct errors based on the Reed Solomon algorithm. The level of correction included can be between 0 and 8.

Sizes

Table: Capacity for a PDF417 code depending on its error level
Error Level Number of keywords required for correction Number of keywords maximum for data
0 2 925
1 4 923
2 8 919
3 16 911
4 32 895
5 64 863
6 128 799
7 256 671
8 512 415

Details

Keywords correspond to a pattern with bars and spaces. A keyword is 17 pixels wide (but for the last column, there are 18).
Keywords for the left and right columns are always the same. They are used to identify the PDF417 code. The 2 other columns touching these columns are "fixed" and are based on the number of lines and error level. No real data is written in these columns.
Data is in between the columns 3 to X-2 included (one indexed and X is the number of columns).

There are 3 tables containing keywords which allow you to encode the barcode. They are used one after the other depending on the line number currently written.

The text you want to write is converted into keywords; there are different encodings in order to get these keywords. Encodings with their meanings are written below. The underlined text is the compression level.

  • Text (2 characters per keyword): Default mode which allows you to encode capital letters, lower case and many punctuation characters. (ASCII 9, 10, 13 & 32 to 127). You will save space if you write your message only in capital letters or only in lower case instead of switching back and forth between these two kinds of letters.
  • Byte (1.2 byte per keyword): 1.2 byte per keyword. Mode which allows you to compress less than the TEXT mode while using all the ASCII characters (ASCII 0 to 255).
  • Number (2.9 numbers per keyword): Mode which allows you to encode all the numbers with a good compression level.

The Reed-Solomon code is added next to the data keywords in order to detect and correct the errors. If there is still some room available for keywords, padding keywords are added to the data.

Barcode Bakery Supports

Supports
Encodes Characters, Numbers, Binary
PDF417 Truncated
Encodes on many codes (Structured Append) *
Extended Channel Interpretation (Arabic, Hebrew, etc.) *
Specific to Node.js package
Node 14+, Canvas 2+
* Will be supported in the next versions