JsBarcode icon indicating copy to clipboard operation
JsBarcode copied to clipboard

Bug in options from strings

Open alpha-and-omega opened this issue 6 years ago • 3 comments

I don't know if this documented, but "width" can be not only int but float (this is required to draw fitted svg barcodes). But since it works using options it should work using jsbarcode-width attribute, but it don't. This is due to bug in src/help/optionsFromStrings.js parseInt should be replaced with parseFloat for "jsbarcode-width" option.

alpha-and-omega avatar Mar 13 '18 00:03 alpha-and-omega

Hi. I'm not sure that float values is a good idea for width param.

SanichKotikov avatar Mar 30 '18 15:03 SanichKotikov

If you don't like it, just don't touch it! I have nothing against it, for me this is good idea. Nobody uses barcodes for images, barcodes are used for printing.

alpha-and-omega avatar Mar 30 '18 17:03 alpha-and-omega

Yep, it would be great to use float values. I need to print barcodes on pricetags with precise dimensions. But I can't use float values in strings. It turns that I need to invoke init() for every barcode wich I don't want to do.

Soheevich avatar Jan 26 '19 09:01 Soheevich