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 543 forks source link

Roadmap ideas #589

Open Richienb opened 4 years ago

Richienb commented 4 years ago

Here are my ideas for v3:

I've successfully tested the pdf saving capabilities of puppeteer and have determined that it would be relatively simple to swap out. Changing it would also fix a bunch of problems outlined in other issues.

In my opinion the current htmlPdf.fromAnything().toAnything() API seems a bit bloated but I'm not quite sure how we could fix it. Any ideas?

// @marcbachmann

JuanM04 commented 4 years ago

I totally support the idea of switching to Puppeteer, but it will cause some trouble for AWS Lambda / Vercel: Puppeteer requires a lot of space, and those services have a hard limit of 50 MB. Only for those cases, it would be a nightmare.

Returning promises and Typescript support are already features! The only thing that is missing is the type for promise returns. When you try to return a promise in TypeScript, it throws an error; but if you ignore it, it works: the type is missing.

Richienb commented 4 years ago

// @marcbachmann

jimmywarting commented 1 year ago

bump