AZTEC siez limitation ?
karimbakouri opened this issue · comments
Hi,
I think i found a strange limitation in the AZTEC barcode. When there is more than 472 chars in the barcode, it is not readable in 33% error code mode :
...
cab2d := "lsdkfmlkfmlkmkmezlkfmlzkfkezfezmfkkljkljkljflmfkelmfklmfezlfkezlmfkzlmefkelfkezlmfezmlflemkflmfklzfelzkflmfkezlmfkezmlfkzefkemzlfkmlezkfmzelfkezmkfelzmfkelzmfkzelmfkezmlfkezlmkflemzfklmezfkelzmfkezmlkfezlfkelmzfkezlmfkezmfkezlmkflmezkfezlmfkezmlfkezmlfklmezkflemzfkzemlkflzmekflzemfkezlmkfezmlfkezlmfkezmlfkezflmkezmlfelmzkfelmzfkzekflemzfklmezfkflmezklmfkezlmfkezlmfkezlfkelzmfkelzmfkezmlfkezlmfkezlmfklzmefkmezlfklmezkflemzkfmlezkfmlezkfezflkzemflkzemlfkzelmfkmelzfkmlz"
keyAztec := barcode.RegisterAztec(pdf, cab2d, 33, 0)
barcode.Barcode(pdf, keyAztec, posX + 87.1, posY + 66.6, 28, 28, false)
...
=> the generated barcode is not readable.
=> if you delete one character and generate it again, it works again.
Please tell me if i made a mistake.
Thank you very much, excuse my poor english :).
In fact, it seems that the issue happens with a specific value, but i can't tell exactly what data is wrong :
cab2d := "\x1E01\x1D02\x1D0075015\x1D250\x1D801\x1D116A1408809691\x1DGEOP\x1D900138\x1D075\x1Dref sender\x1D001/001\x1D02.00KG\x1DN\x1DADRESSE 3\x1DBEAUVITS\x1D\x1Draison sociale\x1E07\x1DG03\x1D0\x1D0\x1D1\x1D\x1FSOCIETE PRENOM DESTINATAIRE\x1FSOCIETE PRENOM DESTINATAIRE\x1F0628840107\x1F\x1F0628840107\x1Fkarim.bakouri@laposte.fr\x1F\x1FADRESSE 1\x1FADRESSE 2\x1DB\x1D002.00KG\x1DSOCIETE\x1DNOM EXPEDITEUR PRENOM EXPEDITEUR\x1Dref sender\x1D\x1D\x1D\x1D\x1D\x1D\x1E07\x1DS010\x1DSOCIETE\x1F0677777777\x1FSOCIETE PRENOM DESTINATAIREADRESSE 3ADRESSE 1\x1FPARIS\x1F75015\x1F250\x1E"
keyAztec := barcode.RegisterAztec(pdf, cab2d, 33, 0)
barcode.Barcode(pdf, keyAztec, posX + 87.1, posY + 66.6, 28, 28, false)
Could you try a different reader? I guess it's either a problem with the reader or the generated checksum is wrong :( I'll have a look at it in a few days.
Indeed, i changed a few characters in the data, and then it worked. It seems to be a problem of checksum. I hope you'll manage to fix this. Please tell me if you need more tests.
Thank you for your work, the library is great !
It seems that the issue is tied to the error correction level algorithm too.