Francois
Francois12mo ago

Possible to use Puppeteer HTML to PDF at 300 dpi?

The default is 96 dpi, but I need 300 dpi as the PDF are for book printing. I see there's a workaround using the Puppeteer npm packages directly, but Buildship send errors. We are stuck with your api endpoint (https://puppeteer.buildship.run/v1/pdf), is there an option to increase to 300 dpi using your API? Thanks
2 Replies
Gaurav Chadha
Gaurav Chadha12mo ago
Puppeteer doesn't provide a solid way to configure the dpi, but there seems to be a workaround for this - https://github.com/puppeteer/puppeteer/issues/1057. @Deepanshu Could you please take a look, if we can allow to support custom configuration of dpi in near future?
GitHub
Issues · puppeteer/puppeteer
Node.js API for Chrome . Contribute to puppeteer/puppeteer development by creating an account on GitHub.
Francois
FrancoisOP12mo ago
yes exactly what I saw. Would be great if we can do that through your backend! btw, no need to use dpi. I just upscale the images using this model and it works just fine at the end: https://replicate.com/nightmareai/real-esrgan

Did you find this page helpful?