Closed ogeagla closed 10 years ago
If I follow this example to save to file:
var barcode = require('barcode'); var code39 = barcode('code39', { data: "it works", width: 400, height: 100, }); var outfile = path.join(__dirname, 'imgs', 'mycode.png') code39.saveImage(outfile, function (err) { if (err) throw err; console.log('File has been written!'); });
Then code39.js:67 throws a TypeError because type is undefined:
type: _options.type.toUpperCase().trim() || 'PNG'
Documentation/example should reflect that this field is mandatory.
Additionally, width and height must be changed to w and h.
Yep... I'll update that shortly.
Me too..
If I follow this example to save to file:
Then code39.js:67 throws a TypeError because type is undefined:
Documentation/example should reflect that this field is mandatory.