0

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?

DumTux
  • 668
  • 1
  • 9
  • 24
  • When you regenerated the barcode from the original scanned data, what error correction level did you use? Different EC levels will drastically change the "look" of the barcode. And did scanning the new barcode return the same data? – Mark Warren Dec 16 '20 at 16:25
  • Yes, it returns the same data, but different look. I'll try to figure out how to set error correction levels and get back to you. But how to detect the original error correction level? – DumTux Dec 16 '20 at 17:13
  • The zxing based app e.g https://play.google.com/store/apps/details?id=com.google.zxing.client.android&hl=en_US&gl=US (no association) returns a metadata value that indicates the EC level. One other thing to look at when generating a PDF417 is setting the number of columns. That setting determines the overall geometry/layout of the barcode. – Mark Warren Dec 16 '20 at 17:46
  • Thank you. The error correction level was 5, and columns was 13. – DumTux Dec 16 '20 at 20:11

0 Answers0