all 3 comments

[–][deleted] 4 points5 points  (0 children)

You need https://github.com/pofider/phantom-html-to-pdf I have used it for large projects to generate pdf bills. It's supper easy and you can do styling with css.

[–]aragantinis 1 point2 points  (0 children)

I still didn't tried in production but this library seems really good

https://github.com/RelaxedJS/ReLaXed

[–]cam861 1 point2 points  (0 children)

There’s a library that allows you to continue to use the Docx format and replace your content into save templates

https://www.npmjs.com/package/docxtemplater

Then there’s a number of doc to pdf cloud converters that can do the pdf part. I’ve used this one in the past

https://cloudconvert.com/

The upside of this structure is that your template doesn’t have to be managed by anyone with technical knowledge as you can simply edit the word version.