marcbachmann / node-html-pdf

This repo isn't maintained anymore as phantomjs got dreprecated a long time ago. Please migrate to headless chrome/puppeteer.
MIT License
3.56k stars 544 forks source link

Convert Pug to PDF? #429

Open Altair312 opened 6 years ago

Altair312 commented 6 years ago

Currently using Pug as my render engine, when using the html-pdf it creates the PDF file successfully, but the inside of PDF is just plaintext. Why?

cbainfotech commented 6 years ago

I also have the same issue, using template engine EJS

Altair312 commented 6 years ago

@cbainfotech

While this has been quite a while, i have mitigated the issue by resorting to html2pdf. You might wanna look into that.

krunalshah68 commented 6 years ago

@Altair312 @cbainfotech You can use renderFile function and get the rendered html string for ejs which you can provide for pdf creation.

This is the solution that I have used for ejs.