2.0.4 • Published 2 years ago

@kth/kth-node-docx v2.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

docx generator

Given a docx file with the following content:

{@publications}

And an XML string generated with the template and/or docx helpers:

<w:p><w:r><w:t>hello world</w:t></w:r></w:p>

Code usage

var fs = require('fs')
var docx = require('@kth/kth-node-docx')
var xml = '<w:p><w:r><w:t>hello world</w:t></w:r></w:p>'
var templateBuffer = fs.readFileSync('template.docx', 'binary')
var outputBuffer = docx.generate(xml, templateBuffer, 'publications')
fs.writeFileSync('publications.docx', outputBuffer)

For an example of how to use the XML helpers, see the test/integration.js file.

2.0.4

2 years ago

2.0.3

2 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago