DEV Community

Discussion on: A full comparison of 6 JS libraries for generating PDFs

Collapse
 
rubenheymans profile image
Ruben

Puppeteer is by far the easiest for me. You just create a page in your frontend framework with html5 /css and use puppeteer with headless chrome to create en exact pdf of that page. Very easy to do you could create a firebase app to use as backend

Collapse
 
snikhill profile image
Nikkhiel Seath

I just had a question about this approach. Rendering a page on a Headless browser is a resource heavy task.
Were you able to get the desired performance? If yes, how many users was this "firebase app" serving and how many requests for generating a PDF was your backend handling?

Thank You
SNikhill

Collapse
 
rubenheymans profile image
Ruben • Edited

I was able to get the desired performance but I'm using firebase so performance is never an issue. I don't have many users. Maybe firebase costs will rise fast if you have lot's of users/requests.

Collapse
 
handdot profile image
Kyohei Fukuda

Indeed, Puppeteer is one of the easiest ways to create PDFs.
However, it can be difficult to use in some use cases.

Collapse
 
aravin profile image
Aravind A

@ruben, It may look like easy.

But you have to open a browser, wait for page to load and take the screenshot. It is a CPU intensive work.

You have to manage memory efficiently.