Appear a random number at last char in the barcode encoded image.
I've noticed the problem with ean-13, in the function barcode_ean_check_digit in ean.inc
Seems that even the code is filled up with zeros in front correctly, the $csum_total variable is wrong and the function return the barcode + the checksum digit.
When submitting a code smaller than 13 chars, it must be filled out by '0' char and when doing this, it only fill a message of 12 chars instead 13.
This behavior cause checksum value of the message to be wrong and also the code encoded to image.
Please review and commit
On the file barcode/plugins/ean.inc change this:
$barnumber = str_pad($barnumber, 12, "0", STR_PAD_LEFT);
with this:
$barnumber = str_pad($barnumber, 13, "0", STR_PAD_LEFT);
Comments
Comment #1
aCCa commentedI'm completely wrong. Check digit MUST be in the EAN code.
Comment #2
aCCa commentedClose issue.
Comment #3
Dean AAron commentedHey, try this powerful barcode generation (including EAN-13) component (for .NET & Java), it can automatically add checksum digit to the barcode and you also able to customize the barcode setting, comply with ISO specification. Hope it is help you solve your problem.
http://www.onbarcode.com/products/net_barcode/
http://www.onbarcode.com/products/java_barcode/
Comment #4
makaveiljojo commentedThe check gigit of EAN 13 is an essential factor when the accuracy of the encoded data is verified. EAN-13 is self-checking with one mandatory check digit that can be calculated from 12 encodable characters.
To generate EAN 13 barcode easily, you may search for some EAN-13 font or EAN-13 .NET control.
Good luck!
Comment #5
Ktueethall commented" The check gigit of EAN 13 is an essential factor when the accuracy of the encoded data is verified. EAN-13 is self-checking with one mandatory check digit that can be calculated from 12 encodable characters.
To generate EAN 13 barcode easily, you may search for some EAN-13 font or EAN-13 .NET control.
Good luck!"
Thanks for such great information for barcode creating.