metafloor / bwip-js

Barcode Writer in Pure JavaScript
Other
2.06k stars 300 forks source link

RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. #337

Open kirankandel opened 3 months ago

kirankandel commented 3 months ago

Using method bwipjs.toBuffer(options, (err,png) => {}) I'm using options :

bcid: 'code39' paddingheight: 7.760141093474427 paddingwidth: 7.760141093474427 width: 70.54673721340389 height: 35.27336860670194

bwip-js version : 4.3.2

metafloor commented 3 months ago

Padding values are integer points. I will update the code for the next release to enforce this.