PDF417 Barcode FAQ

What is PDF417 barcode, encode character set, data length, ECI output, ECL, Macro PDF417, Truncated PDF417 barcodes

What is PDF417 barcode?

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".

What is PDF417 used for?

PDF417 is used in a variety of application settings, such as transport, identification cards, airline boarding passes and inventory management.

PDF417 format basic characteristics

Encoding character set

PDF417 format supports the following character set and compact modes

  • Text Compaction mode permits all printable ASCII characters to be encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as well as selected control characters.
  • Byte Compaction mode permits all 256 possible 8-bit byte values to be encoded. This includes all ASCII characters value 0 to 127 inclusive and provides for international character set support.
  • Numeric Compaction mode permits efficient encoding of numeric data strings.
  • Up to 811,800 different character sets or data interpretations
  • Several function codewords for control purposes.

The maximum data a PDF417 barcode hold

Maximum possible number of characters a PDF417 barcode (at error correction level 0).

  • Text Compaction mode: 1,850 characters
  • Byte Compaction mode: 1,108 characters
  • Numeric Compaction mode: 2,710 characters

At the minimum recommended error correction level,

  • Text Compaction mode: 1,726 characters
  • Byte Compaction mode: 1,033 characters
  • Numeric Compaction mode: 2,528 characters

PDF417 symbol size

  • Number of rows: 3 to 90
  • Number of columns: 1 to 30

PDF417 barcode symbol structure

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:

  • Left quite zone
  • Start pattern
  • Left row indicator codewords
  • Row data (1 - 30 characters)
  • Right row indicator codewords
  • Stop pattern
  • Right quite zone

The PDF417 barcode should be surrounded by a quiet zone on all four sides.

PDF417 character structure

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)

PDF417 start and stop characters

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
Start 8 1 1 1 1 1 1 3
Stop 7 1 1 3 1 1 1 2 1

PDF417 data encoding

PDF417 has defined three high level data encoding modes, each of which defines a particular efficient data encoding.

  • Text Compaction mode
  • Byte Compaction mode
  • Numeric Compaction mode

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.

PDF417 Text Compaction mode

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:

  • Alpha (uppercase alphabetic)
  • Lower (lowercase alphabetic)
  • Mixed (numeric and some punctuation)
  • Punctuation

PDF417 Byte Compaction mode

The Byte Compaction mode enables a sequence of 8-bit bytes to be encoded into a sequence of codewords.

PDF417 Numeric Compaction mode

The Numeric Compaction mode is a method for base 10 to base 900 data compaction and should be used to encode long numeric strings.

PDF417 Extended Channel Interpretation (ECI)

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

  • international character sets (e.g. Arabic, Cyrillic, Greek, Hebrew)
  • general purpose interpretations such as encryption and compaction (as distinct from the compaction modes of the symbology)
  • user defined interpretations for closed systems
  • transmission of control information for Macro PDF417
  • transmission of uninterpreted PDF417 codewords

PDF417 Error Correction Level

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

PDF417 recommended minimum error correction level

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

PDF417 Dimension Size

The PDF417 specification has defined the rules for dimensions. View C# source code: PDF417 barcode size setting in C# barcode generator library.

Minimum width of a PDF417 module (X)

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.

X and Y aspect ratio

The aspect ratio of the printed PDF417 barcode shall be defined by two dimensions:

  • X: the desired dimension of the narrowest bar and narrowest space
  • Y: the desired dimension of the height of each row

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.

PDF417 Rows & Columns

  • Number of rows: 3 to 90
  • Number of columns: 1 to 30

Quiet zones

  • Minimum width of horizontal quiet zone : 2X
  • Minimum size of vertical quiet zone: 2X

Compact (Truncated) PDF417

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

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

  • File ID field: For each related Macro PDF417 symbol, the file ID field contains the same value.
  • The segment index: In Macro PDF417, each barcode represents a segment of the whole data file. To reconstruct the whole data file, the segments need to be placed in the correct order. The segment index for each Macro PDF417 barcode is presenting the relative position of that barcode's content within the distributed data file.

PDF417 & Barcode Software

PDF417 Generator Components

PDF417 Scanner Components

PDF417 Generator & Scanner Softwares

Terms of Use | Privacy Policy
Copyright © OnBarcode.com . All rights reserved.