Skip to content

License data formatting

Joshua Galloway edited this page May 18, 2021 · 1 revision

Format

The data that comes from a PDF-417 barcode on a license should look roughly like this:

@

ANSI 636026080102DL00410288ZA03290015DLDAQD12345678
DCSPUBLIC
DDEN
DACJOHN
DDFN
DADJOE
DDGN
DCAD
DCBNONE
DCDNONE
DBD08242015
DBB01311970
DBA01312035
DBC1
DAU069 in
DAYGRN
DAG1234 TEST ST
DAICity
DAJAZ
DAK955530000  
DCF83D9BN217QO983B1
DCGUSA
DAW180
DAZBRO
DCK12345678900000000000
DDB02142014
DDK1
ZAZAAN
ZAB
ZAC

Issues to be aware of

Though this data looks simple there are a couple things to note.

Unicode control characters

Some scanners will read the presence of unicode control characters at the beginning like this (URL encoded to show their presence): %40%0A%0DANSI%20636060.

You can see that there is a %40 or @ followed by %0A and %0D which is linefeed and c return respectively. If you print these characters most editors/programs will simply ignore them, in some if you arrow through them they will show the presence of a character but nothing will display. You have to be aware of these as sometimes they can cause issues if code does not know they will be there and as they do not print out the issues are sometimes hard to debug.

You can find a handy list of all URL encoded characters if you need it at this HTML URL-encoding Reference.

Clone this wiki locally