UPC-E incorrect
Arduino1987 opened this issue · 4 comments
Arduino1987 commented
I have generate UPC-E for 06141939 code in three different variations which is all valid, but scanner doesn't recognize it. Valid barcode should begin with two short bars, but generated has three.:
valid barcode generated on https://barcode.tec-it.com/en/UPCE?data=04252614:
my code:
$svgContent = new Com\Tecnick\Barcode\Barcode()
->getBarcodeObj('UPCE', '614193', -8, 480, 'black')
->setBackgroundColor('white')
->getSvgCode();
Arduino1987 commented
same issue with old library https://github.com/tecnickcom/TCPDF
but then I have added fix from this issue to old library it generate UPCE properly for 6-digit codes.
nicolaasuni commented
This should be fixed on the latest version:
2f6a691
Arduino1987 commented
nicolaasuni commented
The UPC-E function expect exactly 6 digits, otherwise it will assume that the code is already in UPC-A format.