PDF 417, also known as Portable Data File 417, PDF 417, PDF417 Truncated, is a stacked linear bar code symbol used in a variety of applications, primarily transport, identification cards, and inventory management. PDF stands for Portable Data File. The PDF417 symbology was invented by Dr. Ynjiun P. Wang at Symbol Technologies in 1991.
The PDF417 specification is defined in "INTERNATIONAL STANDARD ISO/IEC 15438:2015".
PDF417 is used in a variety of application settings, such as transport, identification cards, airline boarding passes and inventory management.
PDF417 format supports the following character set and compact modes
Maximum possible number of characters a PDF417 barcode (at error correction level 0).
At the minimum recommended error correction level,
PDF417 is a stacked vertically aligned rows. The minimum row count is 3, and the maximum is 90 rows.
Each row will include at least 1 data character, and max 30 data characters.
A complete PDF417 row consists:
Each PDF417 character will consist of FOUR bar elements and FOUR space elements.
Each bar or space element will be one to size modules wide.
There are total 17 modules for each character.
A sample PDF417 char with 5B 1S 1B 1S 1B 1S 2B 5S. (B for Bar; S for Space)
The PDF417 start and stop chars are unique which have elements more than 6 modules wide.
And the stop char has one extra one module bar element.
All PDF417 rows have the same start and stop chars.
Table-1: PDF417 start and stop characters
Character | Bar-space sequence | ||||||||
B | S | B | S | B | S | B | S | B | |
Start | 8 | 1 | 1 | 1 | 1 | 1 | 1 | 3 | |
Stop | 7 | 1 | 1 | 3 | 1 | 1 | 1 | 2 | 1 |
PDF417 has defined three high level data encoding modes, each of which defines a particular efficient data encoding.
A PDF417 data (characters or bytes) may be converted to different codeword sequences, depending on how the PDF417 barcode generator program switches between compaction modes and sub-modes. There is no single specified way to encode data in a PDF417 barcode.
The Text Compaction mode includes all the printable ASCII characters (i.e. values from 32 to 126) and three
ASCII control characters: HT or tab (ASCII value 9), LF or line feed (ASCII value 10), and CR or carriage
return (ASCII value 13). The Text Compaction mode also includes various latch and shift characters which
are used exclusively within the mode.
The Text Compaction mode has four sub-modes:
The Byte Compaction mode enables a sequence of 8-bit bytes to be encoded into a sequence of codewords.
The Numeric Compaction mode is a method for base 10 to base 900 data compaction and should be used to encode long numeric strings.
The ECI protocol allows the encoding PDF417 data stream to have interpretations
different from that of the default character set.
Five broad types of interpretations are supported in PDF417
The error correction level for a PDF417 barcode is selectable at the time of barcode creation. The following table shows the number of error correction codewords for each 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 |
The minimum level of error correction level should be as defined in the following table
Number of Data Codewords | Minimum Error Correction Level |
1 to 40 | 2 |
41 to 160 | 3 |
161 to 320 | 4 |
321 to 863 | 5 |
The PDF417 specification has defined the rules for dimensions. View C# source code: PDF417 barcode size setting in C# barcode generator library.
It should be defined by the PDF417 application standard, having due regard to the availability of equipment for the production and reading of symbols and complying with the general requirements of the application.
The aspect ratio of the printed PDF417 barcode shall be defined by two dimensions:
A PDF417 barcode with at least the recommended minimum level of error correction,
Y should be at least 3X.
So X to Y ratio is 1: 3.
For PDF417 barcodes with less than the recommended minimum level of error correction,
the row height may be increased, particularly when the X dimension is small.
Compact PDF417 is also named as Truncated PDF417. In the original AIM USA (1994) and AIM Europe (1994) PDF417 specifications,
the term Truncated PDF417 has been used in a technically synonymous manner.
Compact PDF417 may be used where space considerations are a primary concern and symbol damage is
unlikely.
This overhead reduction version is called Compact PDF417, which is fully decoder compatible with standard
PDF417.
A Compact PDF417 symbol with fewer than 6 rows encodes the number of columns in only one place, which
is not error corrected, and is therefore extremely vulnerable to poor print quality or damage.
A sample compact PDF417 barcode.
Macro PDF417 provides a mechanism for the data in a file to be split into blocks and be represented in more
than one PDF417 symbol. This mechanism is similar to the Structured Append feature in other symbologies, such as
Data Matrix,
QR Code.
Up to 99,999 individual PDF417 barcodes may be used to encode data in Macro PDF417.
Some key terms for Macro PDF417