lindell / vue-barcode

Barcode generator for Vue.js
MIT License
220 stars 26 forks source link

Code128C is not working properly #16

Closed Zikaro closed 6 years ago

Zikaro commented 6 years ago

I have a UUID that I'm trying to generate a manageable barcode size for. A commonly suggested way is to use the hex representation then convert to decimal then use Code 128C to generate a barcode.

This library fails to generate barcodes using Code128C with any value of length greater than 20. At 20 it replaces the last couple digits with 0 so it's not even accurate unless you use a value <18 digits.

Code128C does not have a length limitation... why is this library failing with a larger value?

Example... Input value (20 digit count): 12345678901234567890 The generate barcode: vue-barcode-issue-1.pdf

If you use the default format it reduces length by using scientific notation as a string and then generating a barcode against that string which doesn't even make sense. vue-barcode-issue-2.pdf

Zikaro commented 6 years ago

Requirement for input to be String and not a Number.

https://github.com/lindell/JsBarcode/issues/265