Header maths from the standard
IIN, version, entry count, designator, offset and length are derived per jurisdiction, not copied from a sample.
Conformance guide · ISO/IEC 15438 · AAMVA DL/ID
A valid PDF417 symbol and a valid AAMVA credential are two separate tests. A symbol can pass the first and fail the second, and almost every "it will not scan" report lives in that gap.
Updated 2026-11-10 · 1,700 words · applies to every jurisdiction in the API
What the encoder derives
IIN, version, entry count, designator, offset and length are derived per jurisdiction, not copied from a sample.
Every issuer number in one table, with the class, restriction and endorsement elements each one expects.
SVG for offset and laser, PNG at any DPI from 72 to 1200 for thermal and card printers.
DDE, DDF and DDG are set when a name is cut, so a reader never reports a complete name that is not on the card.
DDA is F or N as you supply it. REAL ID and older cards both encode without special cases.
The exact byte string is shown before you download it. Nothing sits between the form and the symbol.
ISO/IEC 15438 defines the symbol, and it defines more than bars. There is a start pattern, a stop pattern, a row structure and a block of error correction codewords. Software that only draws bars can produce an image that looks plausible and decodes nowhere.
Each row opens with the same 17-module start pattern and closes with the same 18-module stop pattern. The start pattern is what a scanner locks onto and how it derives module width; the stop pattern confirms the row ended where the encoder said it would. Crop the right edge or clip the quiet zone and the stop pattern is gone. No error correction level recovers a missing stop pattern, because the failure is physical rather than numeric.
A row indicator codeword sits at each end of every row. Between them they carry the row number, the row count, the column count and the error correction level. That is how a reader knows it has seen the whole symbol after starting in the middle. If the indicators disagree with the rows actually printed, the symbol is malformed even when every data codeword is intact.
Data is packed into codewords in text, byte and numeric modes. An AAMVA payload is mostly upper-case text plus digits and control characters, so a conforming encoder switches mode as it walks the string. The latch codewords are part of the stream and consume capacity. At the margin this decides whether a payload fits the chosen row limit or spills past it.
Level n appends 2(n+1) Reed–Solomon codewords: two at level 0, sixty-four at level 5, five hundred and twelve at level 8. The level is recorded in the row indicators and in the codeword stream, so a reader can check it. A truncated error correction block fails to decode even when the data survived.
| Level | Codewords | Approximate recovery | Typical use |
|---|---|---|---|
| 0 | 2 | ~0% | Clean laser output |
| 2 | 8 | ~7% | Thermal paper |
| 4 | 32 | ~15% | Unlaminated card |
| 5 | 64 | ~20% | Card stock |
| 6 | 128 | ~25% | Laminated card |
| 8 | 512 | ~35% | Wide labels, high wear |
A higher level does not make a symbol more valid. It makes it more tolerant of damage and taller. The error correction reference has the decision table by substrate.
Conformance means the symbol decodes to the exact bytes that went in, at the declared error correction level and dimensions. The practical test fits in one line: decode the output, compare the bytes. If the decoded string differs from the input, the symbol is not conforming, however good it looks.
An AAMVA DL/ID symbol is a PDF417 symbol whose payload follows the AAMVA DL/ID Card Design Standard. ISO/IEC 15438 gets you a readable symbol; AAMVA gets you a credential a reader will accept.
The first 31 bytes have a fixed shape. Byte 0 is the compliance indicator
@. Bytes 1 to 3 are the data element separator, record separator and
segment terminator: 0x0A, 0x1E, 0x0D. Bytes
4 to 8 are the file type marker ANSI , trailing space included. Bytes 9
to 14 are the six-digit IIN. Bytes 15 to 16 hold the AAMVA version, 17 to 18 the
jurisdiction version, 19 to 20 the entry count. The subfile designator follows with
its offset and length.
A header of 30 or 32 bytes is not repairable at the field level. Every offset after it is wrong by the difference.
The IIN names the issuing jurisdiction. It is six assigned digits and cannot be
derived from the state code. California is 636014, New York is
636001, the District of Columbia is 636043. The
jurisdiction index lists all 51.
A symbol whose header IIN disagrees with its DAJ element is internally
inconsistent. Some readers trust the header and some trust DAJ, so the
same card reads as two different issuers. Both values can be individually valid and
the symbol is still wrong.
The designator is two characters, DL for a driver's licence subfile. The
offset is a four-digit decimal byte position measured from the start of the file. The
length is a four-digit decimal count of the subfile's two-byte designator, its
elements and the closing 0x0D. Neither number is repeated inside the
subfile.
header bytes 31
subfile designator 2 (DL, written once at the offset)
body bytes 278 (elements, each ending 0x0A, then 0x0D)
subfile length 280 (2 + 278)
file length 311 (31 + 280)
The common mistake is copying the directory entry into the subfile. It survives a
visual check, the duplicate parses as a DL0 element, and a reader that
bounds the record by the length field reads ten bytes too far. The
byte-level reference walks the same arithmetic through a
real payload with every byte labelled.
DDE, DDF and DDG track the family, given and
middle names. The value is T when the card holds more characters than
the symbol stores, and N when it does not. Truncation without the flag is
silent data loss: the reader reports a full name that is not the name on the card.
DDA is F for a REAL ID compliant card and N
otherwise. It mirrors the card's status. It is not computed from the expiry date or
from whether an address is present, and a wrong value changes how a reader treats the
credential.
DL0.
DL and
stops.
Five of the six are data or print defects, not encoder defects. That is why "which generator" is the wrong first question when a symbol fails.
Decode the raw bytes, not a formatted summary. Check the header byte by byte, recompute the offset and length, then walk the elements. A checker that does exactly this in the browser is at /check-a-pdf417-barcode/: byte table, IIN lookup, arithmetic, and a pass or fail per rule.
Then print one at production size on production stock and scan it with the reader that will be at the counter. A file that decodes is necessary and not sufficient.
| Check | Pass condition |
|---|---|
| Symbol decodes | Raw bytes match the encoded payload |
| Compliance indicator | Byte 0 is 0x40 |
| Separators | Bytes 1–3 are 0A 1E 0D |
| File type | Bytes 4–8 are ANSI |
| IIN | Six digits, matches DAJ |
| Versions | AAMVA 10, jurisdiction 00 |
| Entry count | Matches the number of subfiles present |
| Offset | Points at the subfile designator |
| Length | Equals the designator, the elements and the closing 0x0D |
| Required elements | All present for the jurisdiction |
| Truncation flags | Match the actual name lengths |
| EC level | Matches the substrate |
| 600 DPI, unscaled, full quiet zone |
The byte-level reference is AAMVA payload structure; the substrate rules are in error correction. For how this API differs from a pay-per-barcode web form, read pdf417.pro vs VALIDPDF417.