VALIDPDF417

How to · verification

Check a PDF417 barcode.

To check a PDF417 barcode, decode it first and then test five things in order: the compliance indicator, the issuer identification number, the directory offset, the subfile length and the element set. An image that looks correct can fail any of them, so every check below runs against the decoded string, not against the picture.

ready

The IIN lookup uses /api/v1/jurisdictions from this site. The payload itself is not sent anywhere.

1. Decode the symbol

Use the original PNG, not a screenshot. From a terminal, zbarimg --raw card.png prints the byte string, and zxing-cpp does the same through its CLI or its Python binding. In a browser, the decoder on this site runs locally and shows the element table. If the symbol will not decode at all, the problem is the print or the image, not the payload, and the checks below cannot be applied yet.

2. The compliance indicator and the prefix

Byte 0 must be 0x40, the @ character. Bytes 1 to 3 must be 0x0A, 0x1E and 0x0D, and bytes 4 to 8 must be ANSI with the trailing space. A plain PDF417 encoder that took the string at face value will produce a symbol with none of these, which is why a barcode can scan perfectly and still not be an AAMVA record.

3. The issuer identification number

Bytes 9 to 14 are the IIN, six digits, zero-padded. Check it against the jurisdiction in DAJ: the two must agree. The jurisdiction index lists the value assigned to every state and province. A symbol whose IIN belongs to another state is structurally valid and factually wrong, and the reader's jurisdiction rules are selected by this number.

4. The offset and the length

Bytes 21 and 22 are the subfile designator, usually DL. Bytes 23 to 26 are a four-digit decimal offset, and bytes 27 to 30 are a four-digit decimal length. The offset must point at the byte where that designator repeats, so for a single entry it is 31. The length must equal the bytes from the offset to the end of the string, counting the two-byte designator and the closing carriage return.

The failure to look for is a length ten bytes too large with an element named DL0 immediately after the designator. That is a directory entry written twice, once in the header and once at the start of the subfile, and it is the classic hand-assembly defect.

5. The element set

Every element must be a registered three-letter identifier followed by a value, separated by line feeds and closed by a carriage return. Required elements must all be present for that jurisdiction, values must respect their caps and patterns, and dates must be MMDDYYYY on version 10. New York's list is 28 elements, not 27, because DAH is required there.

What the inspector checks

RulePass condition
Compliance indicatorByte 0 is 0x40 (@)
SeparatorsBytes 1–3 are 0x0A, 0x1E, 0x0D
File typeBytes 4–8 are ANSI
IINSix digits and a known jurisdiction
VersionsAAMVA 10, jurisdiction version two digits
Entry countMatches the subfile entries in the header
DesignatorDL at the declared offset
LengthEquals the 2-byte designator, the elements and the closing 0x0D
Element setAll required elements present, no unknown IDs
JurisdictionDAJ matches the IIN lookup

Run the checks without doing them by hand

The barcode inspector performs all five against a pasted payload and reports each rule separately, with the arithmetic shown. It runs in the browser and sends nothing. If you have the fields but not the symbol, the state page for that jurisdiction carries a known-good payload to compare against.

A pass proves the file is internally consistent. It does not prove the values are true, and it does not prove a counter scanner will read the print. The validity guide covers that gap, and the decoder page covers the image side.

Generate barcode now