PDF417 Explained

PDF417 Example Barcode

PDF417 (from Portable Data File) is a two-dimensional code that can hold up to 2,000 characters. Unlike other "true" 2D codes (e.g. QR or Data Matrix), PDF417 is actually several linear barcodes stacked upon each other. Designed in the early 1990s, the code was originally intended to be scanned row by row with standard CCD barcode scanners which had to be dragged across the code. Readily available and cheap barcode imagers as well as camera-equipped smartphones have rendered this concept obsolete. While the code can be scanned from any angle like true 2D matrix codes the scanning process usually takes longer.

What is PDF417 used for?

Even for small amounts of data PDF417 symbols get fairly large when compared to a modern 2D code (see below for a comparison illustration). Despite this and other disadvantages, PDF417 is still widely used in the transport industry, in manufacturing and on various forms of ID documents, like driver licenses, passports, airline boarding passes etc. In the US the barcode is also used for Military Shipment Labels (MSL) and container labels since Mil Std 129R. Another application is on PowerBall® tickets, sometimes in combination with Code 2-of-5 Interleaved. It is probably an urban myth that the barcode on the ticket can be used to determine the odds of having a winning number on the ticket before the actual draw.

Micro PDF417, Macro PDF417, Compact (Truncated) PDF417

As the code gets rather large (see below) a more compact version was introduced in the mid-1990s. Micro PDF is a simplified version of PDF417 with reduced space requirements that encodes max. 150 characters. It's rarely used, the main application is with GS1 composite barcodes.

Another attempt to reduce the size of PDF417 are Compact or Truncated PDF417. Here the stop character pattern is reduced to a single narrow bar. As a side effect, this also reduces the error correction capability of the code, Compact / Truncated codes are therefore only recommended for applications where it is unlikely that the barcode is damaged (e.g. in an office environment).

If the encoded data doesn't fit into a single PDF417 barcode, it can be spread over several individual codes that are linked together. The Macro PDF specification details how to format the codes and process the scanned result.

PDF417 Specifications

PDF417 is standardized. The relevant standard is ISO/IEC 15438-2006 and can be obtained from ISO.

Sample PDF417

Sample PDF417 barcode encodes "ABCabc123":

PDF417 sample

Compare size to a Data Matrix barcode with the same content and module width (1mm):

Datamatrix vs PDF417

PDF417 can directly encode accented and diacritic characters like german umlauts. Sample code encodes "ÄÖÜäöü":

PDF417 sample umlauts

This code has been verified to scan properly on Mac and Windows PCs. Check the settings of your scanner if the scan result is different or if the code doesn't scan at all.

Common problems when scanning PDF417 with non-ASCII data:
  • The PDF417 symbology is deactivated in the scanner
  • The keyboard layout setting of the scanner does not match the locale setting in your computer

Read PDF417 with a Smartphone

For smartphones, a variety of barcode reader apps support reading PDF417, search the respective App Store. Our suggestion for Android smartphones is the free Zxing Barcode Reader which reads PDF417 and many other codes. Note that recognizing PDF417 codes has to be activated in the app's settings.

Encoding GS/RS/EOT (Group Separator, Record Separator, End-Of-Text) with PDF417

Please see this post about encoding GS, RS, EOT.

PDF417 vs QR

PDF417 vs QR Comparison

QR has several advantages over PDF417:

  • More compact size; square format makes better use of available space (sample codes encode "1234567890")
  • More powerful and user-configurable error correction (ECC)
  • Much faster scanning
  • Much better support (libraries, developer components) for scanning with smartphone cameras
  • Established formats for encoding URLs, Email addresses and similar content
  • Fully Unicode capable
  • Easier branding with custom colors, dot shapes, embedded logos

More about QR codes.

Create PDF417 in Illustrator, InDesign

Easy to use barcode plug-ins and extensions for Adobe InDesign, Illustrator und Photoshop. For more videos, see the Softmatic Youtube Channel

The Softmatic barcode plug-ins and extensions for InDesign, Illustrator and Photoshop are available from the Softmatic store.

Barcode generator software for PDF417

Softmatic BarcodePlus V5 creates PDF417 and will export the barcode as PDF / SVG (resolution-independent vector) oder raster image (PNG, TIFF). The app will automatically format the data according to the specs to create the smallest possible symbol:

PDF417 Generator

PDF417 mass creation

For mass creation of 2D barcodes like PDF417, see Softmatic BarcodeFactory V5. Ideal for personalized 2D codes for tickets, event, mailings. Video shows generating bulk QR codes from email addresses: