8

Now, I'm looking for the solution to generate pdf (invoice with barcode, etc..) from template(html, css) in nodejs environment. I found there are several ways to do that such as wkhtmltopdf, phantom.js & handlebars.js, html-pdf. What I'm concern is which is the best way to solve this problem.

Also, I have look at jsPDF, an client side generation, but it seem not suitable for production right now.

So, Anyone have used one of these library in production, please give me an advised.

Many thanks !

UPDATED:

Headless chromium is now ready for use.

Have some limitation (e.g: custom header, footer), but work great in almost cases. https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md

UPDATED: 4/2019

Now, Puppeteer is a major library for generating pdfs

https://github.com/GoogleChrome/puppeteer

1 Answer 1

0

If the invoice is on a static webpage, PhantomJS will allow you to generate a PDF . Here are a link to the screen-capture section of the docs. It shows you how simple it is do perform this :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.