This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@kth/kth-node-docx

2.0.4 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i @kth/kth-node-docx

Weekly Downloads

0

Version

2.0.4

License

MIT

Unpacked Size

52.3 kB

Total Files

21

Last publish

Collaborators

  • kth-stratus
  • mictsi
  • n_sandstrom
  • kthwebmaster
  • exacs
  • ssundkvist
  • kth-ci
  • emilstenberg