PureDocx is a library that generates docx/xlsx/pptx documents from docx/xlsx/pptx templates. It can replace {placeholders} with data, and also supports loops, conditions, adding or replacing images, charts, watermarks, etc.
- Simple Text Replacing Replace a {placeholder} by a value
- Use loops This tag should use: {#phones} {brand} {/phones}
- Add image This tag should use: {%image}
- Add chart This tag should use: {$chart}
- Add watermark This tag should use: {watermark}
- Simple Text Replacing Replace a {placeholder} by a value
- Use loops This tag should use: {#phones} {brand} {/phones}
- Multi sheet
- Simple Text Replacing Replace a {placeholder} by a value
- Use loops This tag should use: {#phones} {brand} {/phones}
- Add image This tag should use: {%image}
- Add chart This tag should use: {$chart}
Multiple examples are provided in our example repository https://github.com/mllx87/puredocx-examples.
Contact us if you need any specific examples.
With modules:
npm install --save puredocx
First, download the input.docx file and place it in the same folder as your JavaScript file.
const Puredocx = require("puredocx");
// Make sure to load your metered License API key prior to using the library.
// If you need a key, you can sign up and create a free one at https://puredocx.com
var puredocx = new Puredocx()
puredocx.setMeteredKey(process.env.PUREDOCX_LICENSE_API_KEY)
var substitutions = {
"title":"hello",
"summary":"New World",
"staff":30,
"company":"mllx"
};
puredocx.render("input.docx",substitutions,"output.docx")
This software package (puredocx) is a commercial product and requires a license code to operate.
To Get a Metered License API Key in for free in the Free Tier, sign up on https://puredocx.com
Please email us at support@milyleshare.com for any queries.
If you have any specific tasks that need to be done, we offer consulting in certain cases. Please contact us with a brief summary of what you need.