Reputation: 396
using \Zend\Barcode (ZF 2.3.1) I'm not able to produce a readable barcode.
I've attached the picture generated (inside a PDF) by Zend Framework's tool.
The original text was 00000001C
and the factory is code39
. I've tried with code128
but same problem.
For some reason, my Motorola LS2208 can not recognize this barcode.
The specs of this scanner tells it should !
An other strange thing is all "code 39" or "code 128" generated on http://www.barcoding.com/upc/ are different from the ones produced by ZF.
I'm quite new to barcode generation and I just don't have any clue of what are the possible reason of this to fails. Can someone bring me some light here ?
Is the generated barcode correct, at least ?
The ZF documentation about specific renderers is very light...
Upvotes: 1
Views: 385
Reputation: 396
OK, I finally found an answer to this.
First, I was generating barcodes with a width of 2cm.
This is really too tiny for 9 characters using the code 39 symbols.
The screenshot I've taken was made zooming on the PDF ; it shows a code where vertical bars were overlapping themselves.
Basically the solution is : NEVER EVER provide a 'factor' value lower than 1 to BarcodeZF::factory()
, because this is what have makes bars overlap.
Upvotes: 1