Jurisdiction IIN
604428 is written at byte offsets 9 to 14, immediately after
the five-byte ANSI file type marker. It is six digits, zero-padded,
and it identifies the issuing jurisdiction to every reader that parses the
header. A Quebec symbol carrying any other IIN is a valid PDF417 and an
invalid Quebec credential.
The IIN is not the state code and it cannot be computed from one. Quebec's
two-letter code is QC; that value appears in DAJ
inside the subfile, in a different part of the payload. Both are required, and
swapping them produces a symbol that parses and then fails jurisdiction checks.
Current card revision
| Item | 2025 (v11) | The other revision |
|---|---|---|
| DAK (postal code) | space-filled to 11 characters | zero-filled to 9 characters |
| Header version field | 10 | 11 |
| Subfile designator width | 2 bytes | 2 bytes |
| Default for new requests | yes | no, opt in with aamva_version |
The encoder builds Quebec payloads against AAMVA DL/ID Card Design Standard, September 2020 (version 10), with jurisdiction
version 00 and AAMVA version
10. That pair is fixed for every jurisdiction in the
table. With one entry the header is 21 bytes and the directory entry is 10, so the
subfile starts at byte 31 with its own designator.
The revision field states what the encoder targets. It is not a claim about the print date on the card in your hand. If a batch is being produced against a specific card stock or a state-issued template, confirm the version on that template before the run, and treat a mismatch as a reason to stop rather than a reason to hand-edit the header.
Required elements
The jurisdiction table is published as JSON, and the element codes the encoder accepts are at fields.json.
Quebec requires 27 elements. Each row is the AAMVA element identifier, the label the API uses for it, and the format the encoder enforces before it will build a symbol.
| Code | Element | Format |
|---|---|---|
DAQ | License number | 25 characters max |
DCS | Family name | 40 characters max |
DAC | Given name | 40 characters max |
DBB | Date of birth | CCYYMMDD input; MMDDYYYY on the v10 wire |
DBA | Expiry date | CCYYMMDD input; MMDDYYYY on the v10 wire |
DBC | Sex | 1 · 2 · 9 |
DAG | Street address | 40 characters max |
DAI | City | 25 characters max |
DAJ | Jurisdiction | 2 characters max |
DAK | Postal code | 9 characters max |
DCF | Document discriminator | 25 characters max |
DCK | Inventory control | 25 characters max |
DCA | Vehicle class | 4 characters max |
DCB | Restrictions | 12 characters max |
DCD | Endorsements | 12 characters max |
DDA | Compliance type | F · N |
DDB | Card revision date | CCYYMMDD input; MMDDYYYY on the v10 wire |
DDD | Limited duration | 1 · 0 |
DDE | Family name truncated | T · N |
DDF | Given name truncated | T · N |
DDG | Middle name truncated | T · N |
DBD | Issue date | CCYYMMDD input; MMDDYYYY on the v10 wire |
DAY | Eye colour | BRO · BLU · GRN · HAZ · BLK · GRY · DIC |
DAU | Height | 10 characters max |
DCG | Country | 3 characters max |
DDK | Organ donor | 1 · 0 |
DDL | Veteran | 1 · 0 |
Quebec uses 604428 in the 604xxx block. The element list is the US base set the encoder writes; no Quebec-specific schema has been verified here.
Quebec-specific encoding notes
The license number is a text field capped at 25 characters and must match the pattern ^[A-Z0-9-]+$, so uppercase letters, digits and hyphens are the only accepted characters. A longer value is rejected before the symbol is built, so a reader never receives a truncated license number. The discriminator is caller-supplied with no verified derivation recorded, and DCF and DCK each cap at 25 characters.
DCF and DCK rules
DCF is required for Quebec. The document discriminator is jurisdiction-assigned and changes when a card is reissued. When the request asks for generation, the encoder writes 12 characters from an alphabet that omits I, O, 0 and 1, so a discriminator read off a card cannot be mistaken for those glyphs. That generated value is a deterministic stand-in built from DAQ, DBB and DCS; it is not the discriminator printed on a real Quebec card, and it must not be presented as one.
DCK is required for Quebec. The inventory control number is 12 digits from the same basis, so one record always produces one DCF/DCK pair and a different DAQ changes both. An explicit value in the request wins over generation, and neither element is taken from the licence number. Send the card's own values for a production run and generated values only for tests and fixtures.
Recommended error correction
Use level 6 for Quebec. The reason is the substrate: laminated or overprinted card stock. Wear after issuance adds errors that level 5 can only correct up to a point, and the extra codewords are cheaper than a replacement card.
Level 6 adds 128 error correction codewords. Raising it widens the symbol by adding rows, which is the wrong trade on a fixed label. If a print run starts failing, check density, head condition and laminate before raising EC, because correction budget cannot fix a symbol that has lost its start pattern or been cropped by the label template.
Sample JSON body
This body is complete: every required element for Quebec is present, plus a small optional set so the payload length is realistic. Change the values, keep the keys.
{
"state": "QC",
"eclevel": 6,
"format": "png",
"dpi": 600,
"fields": {
"DAQ": "1234567",
"DCS": "SAMPLE",
"DAC": "JORDAN",
"DBB": "19900314",
"DBA": "20300115",
"DBC": "1",
"DAG": "1234 SAMPLE ST",
"DAI": "BEVERLY HILLS",
"DAK": "90210",
"DCF": "QHCHQ8WX3J83",
"DCK": "123456789012",
"DCA": "C",
"DCB": "NONE",
"DCD": "NONE",
"DDA": "F",
"DDB": "20200101",
"DDD": "1",
"DDE": "N",
"DDF": "N",
"DDG": "N",
"DBD": "20240115",
"DAY": "BRO",
"DAU": "070 IN",
"DCG": "USA",
"DDK": "0",
"DDL": "0",
"DAD": "A",
"DAZ": "BRO",
"DAW": "165 LB",
"DAJ": "QC"
},
"aamva_version": "11"
}
Copy-ready cURL
The response is image/png at 600 DPI. Set format to
svg for vector output; that requires a Pro or Team key.
curl -s https://validpdf417.com/api/v1/aamva \
-H "Authorization: Bearer $PDF417_KEY" \
-H "Content-Type: application/json" \
-d '{"state":"QC","eclevel":6,"format":"png","dpi":600,"fields":{"DAQ":"1234567","DCS":"SAMPLE","DAC":"JORDAN","DBB":"19900314","DBA":"20300115","DBC":"1","DAG":"1234 SAMPLE ST","DAI":"BEVERLY HILLS","DAK":"90210","DCF":"QHCHQ8WX3J83","DCK":"123456789012","DCA":"C","DCB":"NONE","DCD":"NONE","DDA":"F","DDB":"20200101","DDD":"1","DDE":"N","DDF":"N","DDG":"N","DBD":"20240115","DAY":"BRO","DAU":"070 IN","DCG":"USA","DDK":"0","DDL":"0","DAD":"A","DAZ":"BRO","DAW":"165 LB","DAJ":"QC"},"aamva_version":"11"}' \
-o qc-dl.png
Full sample payload string
The string below is what the encoder hands to PDF417. Control characters are
shown as visible glyphs: ␊ is the element separator
(0x0A), ␞ is the record separator
(0x1E) and ␍ is the segment terminator
(0x0D). This payload is 306 bytes.
@␊
␞␍ANSI 604428110001DL00310275DLDAQ1234567␊
DCSSAMPLE␊
DACJORDAN␊
DBB03141990␊
DBA01152030␊
DBC1␊
DAG1234 SAMPLE ST␊
DAIBEVERLY HILLS␊
DAJQC␊
DAK902100000␊
DCFQHCHQ8WX3J83␊
DCK123456789012␊
DCAC␊
DCBNONE␊
DCDNONE␊
DDAF␊
DDB01012020␊
DDD1␊
DDEN␊
DDFN␊
DDGN␊
DBD01152024␊
DAYBRO␊
DAU070 IN␊
DCGUSA␊
DDK0␊
DDL0␊
DADA␊
DAZBRO␊
DAW165 LB␊
␍
The header is 31 bytes: 21 bytes before the directory and one 10-byte directory
entry. The subfile offset is the decimal value in the four digits after
DL, and the subfile length counts its own two-byte designator, its
elements and the closing 0x0D. The offset and length are not repeated
inside the subfile; a second copy is read as a DL0 element.
Three scanner rejections
These are the failures that show up most often on Quebec records, in the order they are usually found.
- Accented characters in DAC, which the pattern rejects.
- DCF with lowercase letters; values are uppercased, which changes the discriminator.
- Level 4 on a laminated card.
Questions
What IIN does Quebec use?
Quebec uses IIN 604428, written at header bytes 9 to 14. The two-letter code QC is not the IIN: it appears in DAJ inside the DL subfile. A symbol carrying a different IIN parses and still fails the jurisdiction check.
How many elements does a Quebec record require?
The encoder requires 27 elements for Quebec, written into a single DL subfile. DCF is on that list, so a blank discriminator is rejected before encoding. DCK is on it as well. The element table on this page lists every code and the format the encoder enforces.
Can the API generate the DCF and DCK for Quebec?
Yes, when the request includes "generate": {"dd": true, "icn": true}. Both values are derived deterministically from DAQ, DBB and DCS, so the same record produces the same pair on every call, and an explicit value in fields always overrides the generated one. Neither value is derived from the licence number.
Is the Quebec element set verified?
No. The IIN 604428 comes from the AAMVA IIN registry, but the element list on this page is the US base set the encoder writes. Provincial sets can diverge and have not been verified against a provincial specification, so check the card with the issuing authority before a production run.
Compare
A single Quebec barcode costs $3.00 from pdf417.pro and $2.00 here, and the gap holds down the ladder: $239 against $299 at 500. The arithmetic and the API differences are in VALIDPDF417 vs pdf417.pro for Quebec barcodes, and the switching case is in the pdf417.pro alternative for Quebec. The per-symbol pricing at every rung is on the cheapest AAMVA generator page, and the volume break-even is in the cost calculator.
Reference
Read the byte layout in AAMVA payload structure, the element rules in Parameters, and the substrate decision table in Error correction.
To check a finished symbol instead of a payload, use the barcode inspector. It recomputes the offset and length and checks every element against the same registry this page uses.
Other jurisdictions
Alberta · British Columbia · Manitoba · New Brunswick · Newfoundland · Nova Scotia · all 63 jurisdictions