docx-to-builder that takes a branded Word template and generates a ready-to-run docx.js builder from it #3423
jermorrison22
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I built a tool called docx-to-builder that takes a branded Word template and generates a ready-to-run docx.js builder from it.
The problem it solves: you have a .docx with exact fonts, colors, tables, headers, and footers — and you want to generate documents from it programmatically without manually rebuilding all that layout in docx.js code.
It reads the raw XML, extracts all the formatting decisions, and writes a complete JavaScript file with buildDocument(data, outputPath). Any [bracketed text] in the template gets automatically wired to a data.fieldName reference.
GitHub: https://github.com/jermorrison22/docx-to-builder npm: https://www.npmjs.com/package/docx-to-builder
I hope you find it useful.
All reactions