1
votes

I am using code128 bar-code generator for generating bar-code in oscommerce site. If I am passing serial number of 19 digits (example : NJUGFRTUIVCD4567889) ,bar-code generates in correct format. But If the digits exceeds 20 , then bar-code is not generating in correct format. The text under bar-code will disappear.

What might be the problem for this. I changed width and height of barcode. But of no use. Any help...

1
Which library are you using ? Have you tried to check which part is responsible for generating it ? If so maybe you can provide us the core of it ? And maybe just limit the characters to 19 ? - HamZa
I am using BarCode library.There is no limit to the characters. - philomine
@philomine can you share the code, by which you are trying to generate barcode Meanwhile if you want only 128 barcode use this github.com/anigenero/PHP-Barcode-Generator/blob/master/… its helpful and don't break. - Abhishek

1 Answers

1
votes

This might be caused by the limitation of integer length. A signed 64bit integer can only contain 19 digits. You should keep it as a string or chose another data type which allows more than 19 digits.