Last updated
Basic PDF417 Barcode
Generate a PDF417 barcode from text data:
Input: "Order #12345 — Customer: John Smith — Ship to: 123 Main St"
Error correction: Level 2 (recommended)
Columns: 5
Rows: Auto-calculated
Output: PDF417 barcode image (PNG or SVG)
Dimensions: ~200 × 80 pixels at standard module size
Data capacity used: 62 characters of 1,850 max
Driver's License Data (AAMVA Format)
US driver's licenses encode personal data in AAMVA-compliant PDF417:
AAMVA barcode data format:
@
ANSI 636014090002DL00410278ZC03190024DLDAQD12345678
DCSDOE
DACJOHN
DADMICHAEL
DBD03172024
DBB01151985
DBA01152029
DBC1
DAY BLU
DAU508
DAG123 MAIN ST
DAISPRINGFIELD
DAJIL
DAK627010000
DCF1234567890123456789
DCGUSA
DCUIII
DCAD
DCB
DCD
DCE5
DCFIL
DCGUSA
ZCZCAdditional state data here
Field codes: DAQ=License Number, DCS=Last Name, DAC=First Name, DBB=DOB, DBA=Expiry, DAG=Address. The generator creates AAMVA-compliant barcodes for testing identity verification systems.
Airline Boarding Pass (BCBP Format)
IATA BCBP (Bar Coded Boarding Pass) uses PDF417:
BCBP data:
M1DOE/JOHN EABC123 ORDLAXUA 0123 024Y014B0047 100
Decoded:
Passenger: DOE/JOHN
PNR: ABC123
From: ORD (Chicago O'Hare)
To: LAX (Los Angeles)
Carrier: UA (United Airlines)
Flight: 0123
Date: Day 024 of year (January 24)
Cabin: Y (Economy)
Seat: 14B
Sequence: 0047
Error Correction Levels
Choosing the right error correction for your use case:
Level 0 — No error correction
Barcode size: Smallest
Damage tolerance: None
Use: Controlled environments, digital display only
Level 2 — Standard (recommended)
Barcode size: ~20% larger than level 0
Damage tolerance: Minor damage
Use: Printed labels, general purpose
Level 4 — High
Barcode size: ~50% larger than level 0
Damage tolerance: Moderate damage (up to 25%)
Use: Outdoor labels, shipping, luggage tags
Level 8 — Maximum
Barcode size: ~3× larger than level 0
Damage tolerance: Severe damage (up to 50%)
Use: Harsh environments, critical applications
Data Capacity Reference
How much data PDF417 can encode:
Text (alphanumeric):
Maximum: ~1,850 characters
Typical use: Complete records, structured data
Binary data:
Maximum: ~1,108 bytes
Use: Images, compressed data, binary records
Numeric only:
Maximum: ~2,710 digits
Use: Large numeric datasets (most efficient mode)
Comparison with other barcodes:
QR Code: ~4,296 alphanumeric chars
PDF417: ~1,850 alphanumeric chars
Code 128: ~80 chars (1D barcode)
EAN-13: 13 digits only
Embedding in a Web Page
Generated HTML/JavaScript code for dynamic PDF417 generation:
<!-- Using pdf417.js library -->
<canvas id="barcode"></canvas>
<script src="https://cdn.jsdelivr.net/npm/pdf417-js/dist/pdf417.min.js"></script>
<script>
const canvas = document.getElementById('barcode');
PDF417.draw(
'Order #12345 — Customer: John Smith',
canvas,
2, // error correction level
-1, // columns (-1 = auto)
3 // module size (pixels per module)
);
</script>
Shipping Label Application
Encoding a complete shipping record in one barcode:
Shipping data:
Tracking: 1Z999AA10123456784
Sender: Contoso Ltd, 100 Business Ave, Chicago IL 60601
Recipient: John Smith, 456 Oak St, Austin TX 78701
Weight: 2.5 lbs
Service: UPS Ground
Ship Date: 2024-03-17
Encoded as PDF417:
All fields in one scannable barcode
Scanner reads complete record in one scan
No manual data entry required at each checkpoint
Compact PDF417 vs Standard
Standard PDF417:
Has start/stop patterns on left and right
Has row indicators on both sides
More robust scanning
Larger physical size
Compact PDF417:
Omits right row indicator
~15% smaller than standard
Requires more precise scanning
Use when space is very limited
Standard is recommended for most applications.
Use Compact only when space constraints require it.
Scanning Compatibility
PDF417 barcodes generated by this tool are compatible with:
- 2D barcode scanners (handheld and fixed-mount)
- Mobile phone cameras with barcode scanning apps
- Document scanners with barcode recognition
- ZXing (Zebra Crossing) library — open source
- ZBar barcode reader library
- iOS AVFoundation barcode detection
- Android ML Kit barcode scanning
The generated barcodes conform to ISO/IEC 15438 and include the required quiet zones (minimum 2 module widths on all sides) for reliable scanning.