What Is PDF417? The Complete Barcode Format Guide
PDF417 is a two-dimensional (2D) stacked barcode format capable of storing large amounts of data — up to 1,850 ASCII characters or 1,108 bytes of binary in a single symbol. Unlike a simple 1D barcode (the kind on a grocery product), PDF417 encodes data in a grid of stacked rows, giving it a distinctive rectangular appearance.
You'll find PDF417 on driver's licenses, airline boarding passes, shipping labels, and event tickets. It is one of the most widely deployed 2D barcode formats in North America and is the mandated format for AAMVA-compliant identification documents in the US and Canada.
What Does "PDF417" Stand For?
The name breaks down as follows:
- P — Portable
- D — Data
- F — File
- 417 — Each codeword in the symbol consists of 4 bars and spaces, and each pattern is 17 modules wide
The format was developed by Symbol Technologies (now Zebra Technologies) in 1991 and standardized under ISO/IEC 15438.
How PDF417 Works
PDF417 encodes data as a series of stacked linear bar patterns. Each row contains:
- A start pattern (left side)
- A left row indicator (encodes row number and other metadata)
- Data codewords (2–30 per row)
- A right row indicator
- A stop pattern (right side)
The full symbol can have 3 to 90 rows and 1 to 30 data columns. This flexibility allows PDF417 to scale from small labels with a few bytes to large symbols encoding kilobytes of data.
Codewords, not bits
PDF417 operates on codewords, not individual bits. Each codeword is one of 929 possible values (0–928) and encodes different types of data depending on the active compaction mode:
| Mode | What it stores | Efficiency | |---|---|---| | Text compaction | Uppercase, lowercase, punctuation | 2 characters per codeword | | Byte compaction | Any binary data | 6 bytes per 5 codewords | | Numeric compaction | Digits only | ~3 digits per codeword |
The encoder chooses modes automatically and can switch between them mid-symbol to maximize density.
PDF417 vs QR Code vs Code 128
PDF417 is not the only format for storing large payloads. Here's how it compares:
| Property | PDF417 | QR Code | Code 128 | |---|---|---|---| | Dimensions | Rectangular (stacked rows) | Square matrix | Linear (1D) | | Max capacity | ~1,850 chars | ~3,000 chars | ~48 chars (practical) | | Error correction | Reed-Solomon (levels 0–8) | Reed-Solomon (L/M/Q/H) | None (parity only) | | Damaged scan | Good (adjustable level) | Excellent | Poor | | Scanner required | 2D area imager | 2D area imager | Laser or 2D imager | | Mandated for | AAMVA IDs, airline boarding | Payments, URLs, marketing | Retail, postal | | ISO standard | ISO/IEC 15438 | ISO/IEC 18004 | ISO/IEC 15417 |
When to choose PDF417: - You need to store hundreds of characters in a single barcode - Your use case requires compliance with AAMVA, boarding-pass (IATA BCBP), or government formats - You need adjustable error correction for varying print environments
When to choose QR: Slightly higher data density in smaller area; better phone-camera readability; standard for URLs and payments.
When to choose Code 128: Short payloads (≤48 characters); 1D scanner environments; retail and postal applications.
For a deeper comparison, see PDF417 vs QR vs Code 128 — which barcode should you use? →
Where Is PDF417 Used?
Driver's Licenses and Government ID
Every US state and Canadian province issues AAMVA-compliant driver's licenses with a PDF417 barcode on the back. The barcode encodes name, address, date of birth, license number, restrictions, and endorsements in a standardized format. Law enforcement, age-verification systems, and rental car companies scan these barcodes for data entry.
Airline Boarding Passes
IATA's Boarding Pass Implementation Guide (BCBP) specifies PDF417 as the standard barcode format for paper boarding passes. The barcode encodes your name, flight number, seat, departure gate, passenger status, and a security token — all in one scannable symbol.
Shipping and Logistics
USPS uses PDF417 barcodes on postal forms including customs declarations. Some carriers and freight forwarders use PDF417 on shipping labels alongside or instead of Code 128, particularly when the label must carry extra data (hazmat UN numbers, lot tracking, customs reference).
Healthcare
HIPAA-compliant patient wristbands and specimen labels often use PDF417 because it can encode a patient ID, medical record number, date of birth, and allergy flags in a single scan — reducing transcription errors.
Event Tickets
Venue ticketing systems (sports, concerts, transit) use PDF417 for high-data tickets where the barcode must carry cryptographic tokens long enough to prevent forgery.
Error Correction: Why PDF417 Is Robust
PDF417 uses Reed-Solomon error correction — the same algorithm used in CDs and QR codes. You can choose from 9 levels (0–8):
- Level 0: Detection only (no correction)
- Level 2: Standard default for office printing
- Level 5: Recommended for shipping labels
- Level 8: Maximum — survives damage to ~50% of the symbol
Higher levels make barcodes larger but significantly more resistant to physical damage. For a full breakdown, see PDF417 error correction levels explained →.
Limitations of PDF417
PDF417 is a powerful format but not a universal best choice:
- Requires a 2D scanner. 1D laser scanners (the kind in most retail checkout lanes) cannot read PDF417. Your environment must have 2D area imagers or smartphone scanning.
- Larger than QR at equivalent data. QR Code's matrix layout is more space-efficient at smaller symbol sizes for the same payload.
- No rotation tolerance. Unlike QR, PDF417 cannot be read upside down by default. Scanners must present it in the correct orientation (though most modern imagers handle this automatically).
- Print quality matters. PDF417's stacked-row structure requires clean horizontal row boundaries. Poor contrast or blur that would be acceptable for Code 128 can cause PDF417 failures.
Generating PDF417 Barcodes
PDF417 barcodes can be generated:
Online (no code required): PDF417 Studio → lets you enter a payload, choose error correction level and column count, and download PNG or SVG instantly.
Via API:
bash
curl -X POST https://www.pdf417-studio.com/api/generate \
-H "Content-Type: application/json" \
-d '{
"payload": "Hello, PDF417!",
"errorCorrection": 3,
"columns": 5
}'
Via library:
```python
pip install pdf417
from pdf417 import encode, render_image
codes = encode("Hello, PDF417!", columns=5, security_level=3) image = render_image(codes) image.save("barcode.png") ```
For a full walkthrough, see How to generate a PDF417 barcode →.
Verifying a PDF417 Barcode
Before deploying barcodes in production, verify them with the PDF417 Studio Diagnose tool →. Upload an image and get:
- Decoded payload
- Contrast ratio check
- Quiet-zone measurement
- Format confirmation
This catches print-quality issues before they reach the field.
Summary
- PDF417 is a 2D stacked barcode standardized under ISO/IEC 15438.
- It encodes up to 1,850 ASCII characters or 1,108 bytes per symbol.
- It is used on driver's licenses (AAMVA), boarding passes (IATA), shipping labels, and event tickets.
- It uses Reed-Solomon error correction with 9 adjustable levels.
- You need a 2D imager (not a 1D laser scanner) to read it.
- Generate one for free at PDF417 Studio →
See also: - PDF417 vs QR vs Code 128 → - PDF417 error correction levels explained → - How many characters fit in a PDF417 barcode? → - API documentation →