zint / zint-gpl-only

Zint Barcode Generator
https://zint.org.uk/
GNU General Public License v3.0
525 stars 138 forks source link

PDF417 error in generated barcode #77

Closed ocgltd closed 2 years ago

ocgltd commented 3 years ago

I'm investigating why PDF417 barcodes I create with ZINT aren't being accepted by some of our security scanners. I noticed a very subtle difference in the barcode generated by our label printer (and software) and the one generated by zint. I have attached an example.

The number of columns and rows is identical, and the start and stop columns (1 and 5) look identical. However, notice how col 2 starts to look different in the ZINT barcode?

I should point out that both barcodes scan fine on my test scanner and cell phone scanner and both decode to the same number, but the security scanners are rejecting the zint barcode. I assume that there is a bug in zint causing the different barcode. Can someone confirm the bug ? (And hopefully resolve)

In case it matters, I'm using these settings

m_symbol->option_1 = 2;  // 4 word ecc (I think 2^2)
m_symbol->option_2 = 3;  // 3 col + start + stop

FYI: I tried to recreate the problem in Zint Barcode Studio 2.4 but that generates another (3rd) different barcode - as shown below. Even with the same settings as above.
studio-barcode

So I also tried a bunch of online (web) based barcode generators, and I'm suprised to find everyone seems to come up with a different barcode! Is there perhaps a parameters I need to set to bring above (first two) barcodes into alignment?

ocgltd commented 3 years ago

Based on another issue raised, I see there is an optional check byte ("--secure"). Could that be the cause?

Also, could the above barcode be switching from Text to Numeric midway through the encoded string?

gitlost commented 2 years ago

Hi, if you could provide more detail e.g. what you expect versus you get then we may be able to help you. In any case this fork is no longer in use so please raise a ticket at https://sourceforge.net/p/zint/tickets/ if you've still got an issue and can provide more detail, thanks.