I need to generate PDF documents (invoices, letters, etc.) based on the some templates (rather complex documents with tables, pictures, etc.). The template is docx (or any other format supported by MS Office).First option: create HTML template directly from MS Word (it still can save a documents to HTML, but you know how this code looks like). My inner purist is a little against it. Creating templates manually in pure HTML is not an option. Editing on the fly should be relatively easy, and I can create a PDF with e.g. Puppeteer.Second option: https://hackernoon.com/generating-pdfs-in-javascript-for-fun-and-profit-c7af594cf697 but there are limits (300 conversions per month)Third option: https://www.npmjs.com/package/docx + https://www.npmjs.com/package/unoconv but it requires Libre/OpenOffice available.Do you have any other ideas or tested solutions? It needs to be free/open source. Cloud and remote solutions are out of the scope.
Submitted May 01, 2019 at 11:50AM by kszyh_pl
No comments:
Post a Comment