@jsreport/jsreport-docxtemplater
v4.1.2
Published
jsreport recipe using docxtemplater to create docx files
Downloads
172
Readme
@jsreport/jsreport-docxtemplater
jsreport recipe for creating docx word document using docxtemplater
See https://jsreport.net/learn/docxtemplater
Installation
npm install @jsreport/jsreport-docxtemplater
jsreport-core
You can apply this extension also manually to jsreport-core
const jsreport = require('@jsreport/jsreport-core')()
jsreport.use(require('@jsreport/jsreport-docxtemplater')())
const result = await reporter.render({
template: {
engine: 'none',
recipe: 'docxtemplater',
docxtemplater: {
templateAsset: {
content: fs.readFileSync(path.join(__dirname, 'template.docx'))
}
}
},
data: {
name: 'John'
}
}
)