PDF-417 Barcode Generator API
Stacked barcode for ID cards and transport
Sample PDF417 barcode
Generated live by the BarGen API from https://bargen.pro
PDF-417 is a stacked linear barcode standardized as ISO/IEC 15438, built from multiple rows of narrow linear symbols read together as one symbol. It can store up to about 1,100 bytes of data with selectable error correction levels 0 through 8, which is why it became the default choice for government-issued ID cards, shipping labels, and paper boarding passes where a large amount of structured data needs to survive folding and handling.
The BarGen API renders a PDF-417 symbol from a text payload in a single request, returning SVG for print-ready vector output or PNG for screen and label printers. Row count, column count, and error correction level can be tuned to match label dimensions.
PDF417 is a stacked linear barcode format invented by Ynjiun Wang at Symbol Technologies in 1991. The name comes from "Portable Data File" and the fact that each pattern in the code consists of 4 bars and spaces, with each pattern being 17 units long.
Unlike true 2D barcodes, PDF417 is actually a stacked set of linear barcodes. This design allows it to be read by simpler linear scanners, while still providing high data capacity—up to 1,850 alphanumeric characters or 2,710 numeric digits.
PDF417 includes robust error correction using Reed-Solomon codes. The error correction level can be adjusted from 0 to 8, with higher levels providing more redundancy at the cost of barcode size.
Primary applications include government-issued IDs (US driver's licenses, military IDs), airline boarding passes, shipping labels, and inventory management. The International Air Transport Association (IATA) adopted PDF417 for boarding passes in 2005.
Common use cases
Driver license and government ID
The AAMVA standard for North American driver licenses places a PDF-417 barcode on the card back encoding the holder's demographic data.
Boarding passes and travel documents
Paper boarding passes and some visa documents use PDF-417 to carry passenger and itinerary data readable at gate scanners.
Shipping and inventory labels
Freight and warehouse labels use PDF-417 when a single symbol needs to carry more structured data than a linear barcode allows.
Generate PDF417 via the REST API
curl "https://api.bargen.pro/v1/barcode/pdf417?data=https%3A%2F%2Fbargen.pro&format=svg" \
-H "X-API-Key: YOUR_API_KEY"
Returns the barcode as SVG. See the API documentation for all options.
Frequently asked questions
How much data fits in a PDF-417 symbol?
A PDF-417 symbol can hold up to roughly 1,850 text characters or 1,100 binary bytes, though practical label sizes typically use a fraction of that capacity.
What do the PDF-417 error correction levels do?
ISO/IEC 15438 defines nine levels, 0 through 8, each adding more redundant codewords; higher levels tolerate more print damage but increase the symbol size.
Why do driver licenses use PDF-417 instead of a QR Code?
AAMVA standardized on PDF-417 before 2D matrix codes were common in ID applications, and its high data density in a wide, low-profile shape suits the layout of a card back.
Specifications
- Capacity
- Up to 1,850 alphanumeric characters
- Error Correction
- Reed-Solomon (levels 0-8)
- Structure
- Stacked linear (3-90 rows)
Related formats
Start generating PDF417 barcodes
Free tier with 1,000 API calls per month. No credit card required.