samt/barcode

Max-width option instead of fixed width option

basav22 opened this issue · 0 comments

While creating barcode, we need to give fixed width. So, sometimes, generated barcode ends up taking more space than required. It would be great to return barcode image of exact size of barcode. So, one way could be to give max-width option. And try generating barcode image of actual size(not of max-width).

let code128 = Barcode('code128', { data: invoiceData.packageCode, maxWidth: 230, height: 50 });