JsBarcode icon indicating copy to clipboard operation
JsBarcode copied to clipboard

increase spacing between bars?

Open AlexTaverna opened this issue 2 years ago • 3 comments

the barcodes aren't very readable on my labels, due to the low quality of my label printer. because of this, i'm looking for a way to increase the spacing between bars, or, change the width ratio between bars and spaces. if this is possible, i really wish to know how!

AlexTaverna avatar May 09 '22 08:05 AlexTaverna

use the "width" property

https://github.com/lindell/JsBarcode/wiki/Options#width

GiovanniCardamone avatar Jul 14 '22 14:07 GiovanniCardamone

if the width is too small, the barcode will not be scanned (ex: barcode width: 0.6, printing paper length: 35mm). Do you have any solution? @GiovanniCardamone

thanglong134 avatar Jul 27 '22 02:07 thanglong134

@thanglong134 width defines the width of a single bar, I think you should use multiples of 1. (1 means one pixel in canvas).

If you use 0.6 you will use half a pixel, and this means you will have an average value, this isn't correct for the barcode.

GiovanniCardamone avatar Jul 27 '22 03:07 GiovanniCardamone