-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extra 0 prepended to barcode #2
Comments
Hi! I know that those NEED to have even digits and zero is appended with the following code, for the Bar to be generated. This checks the length for MOD 2 (even number) and append the zero. What I find weird is that your example has already even number of digits. // add trailling zero if odd digits on Code128C
$bc_string = strlen($bc_string) % 2 == 0 && $encoding === 'CODE_128_C'?
$bc_string : '0'.$bc_string; If it is not here, then it is inside the Barcode generator code.
I will make some testes here now. |
Ok, I think I found the problem. Fix is published here dce7413 I would use git though:
If already used git, it is easy to update with # run this inside the cli-barcode folder
git pull Make sure you have the new version (
Please let me know if all went fine. |
BTW, This is meant for CLI (terminal, bash, etc) If you are really using from PHP, You can use my script as an example on how to implement your code. If you want to make a script that runs with predefined parameters, Cheers! |
All the codes I create are always prepended by a zero. For example, if I use the code 123456 then the scanned code is 0123456. Here is the exact code I am using to generate the barcode:
<?php exec('barcode -h 90 -e CODE_128 -f PNG "123456" bcode.png'); ?>
Here is the code I used to install:
The text was updated successfully, but these errors were encountered: