bwip-js icon indicating copy to clipboard operation
bwip-js copied to clipboard

reduce barcode GS1-128 size

Open Masber opened this issue 5 years ago • 1 comments

Hi,

I am using bwip-js to print a gs1-128 barcode into an image and add it to a pdf using pdfmake. For some reason, the barcode does not fit in an A6 portrait page.

I am trying using "scale: 1" to reduce the size but it is not enough. Any idea of how could I reduce the barcode size further?

thank you

Masber avatar Nov 08 '20 15:11 Masber

scale=1 is a 1px module width, the narrowest bar/space element in code128. It can't be made any smaller.

What scale are you using when embedding the image in the pdf? Unless the barcode is really long (lots of data), I suspect that is the issue.

metafloor avatar Nov 08 '20 16:11 metafloor