docxtemplater is a library to generate docx/pptx documents from a docx/pptx template. It can replace {placeholders} with data and also supports loops and conditions. The templates can be edited by non-programmers, eg for example your clients.
Installation: npm install docxtemplater
If you download the JS from there, you should use new Docxgen() instead of new Docxtemplater(), because I do not want to bring in a breaking change on a minor version change in the docxtemplater-build repository.
If you download the JS from there, you should use new Docxgen() instead of new Docxtemplater(), because I do not want to bring in a breaking change on a minor version change in the docxtemplater-build repository.
I recommend you to use the npm scripts I wrote (which can be found in the package.json).
npm install && npm run compileYour version of docxtemplater will be in /build (minified and non minified options) and already include all dependencies
Create the following html
There are a few similar libraries that work with docx, here's a list of those I know a bit about:
Functionality can be added with modules. They is yet no doc for the modules because it is not completely mature yet, but you can open an issue if you have any question about it.
Here is the list of existing modules:
I can give your company support for installing, extending, answering support questions, or maintainning your app that runs docxtemplater. You can find my email address on my