Re: How can I merge docx with barcode?
I have a docx template and would like to insert barcode inside it (qrCode)
Her is what I tried, but not working. Please, can someone telle how to achieve this.
Screentip :
{{docxImage src=barcodeHerper "qrcode" data.invoiceNumber}}
helper function :
const bwipjs = require('bwip-js')
function barcodeHelper(barcodeType, text) {
return bwipjs.toBuffer({
bcid: barcodeType,
text: text
}).then(p => 'data:image/png;base64,' + p.toString('base64'))
}