Create US Driver License PDF417 barcode using AAMVA data

13.4k views Asked by At

I am trying to generate US DL barcode.

I've tried to read the original barcode with barcode parser, convert it to ASCII string, and re-generate a new PDF417 barcode with that string. The result barcode image was different with the original one.

I've also tried to parse it and many online parsing tools worked well. Parsing the real barcode gives such data in AAMVA format.

<AAMVA>
  <user>
    <last e="DCS">Last Name</last>
    <first e="DAC">First Name</first>
    <middle e="DAD">Middle Name</middle>
    <dob e="DBB">YYYY-MM-DD</dob>
    <eyes e="DAY">BRO</eyes>
    <sex e="DBC">M</sex>
    ...
    <issued e="DBD">YYYY-MM-DD</issued>
    <expires e="DBA">YYYY-MM-DD</expires>
  </user>
  <head>
    <filetype name="File Type">ANSI</filetype>
    <format name="Data Format">11</format>
    <issuer name="Issuer Identification Number">xxxxxx</issuer>
    ...
  </subfile>
  <subfile designator="ZO" offset="248" length="65">
    <element id="A" name="Optional field A">N</element>
    <element id="B" name="Optional field B">N</element>
    ...
  </subfile>
</AAMVA>

I need to edit this data and re-generate a valid PDF417 barcode.

How can I do this with free libraries or tools?

0

There are 0 answers