Re:Official Puppeteer Support for Firefox
by mstijak on Wednesday August 07, 2024 @03:28PM
(#41184505)
Are there any advantages to using Firefox over Chrome for exporting PDFs with Puppeteer?
[ Parent
| on HN ]
Re:Official Puppeteer Support for Firefox
by lol768 on Wednesday August 07, 2024 @03:33PM
(#41184562)
I've found Firefox to produce better PDFs than Chrome does, for what it's worth. There are some CSS properties that Chrome/Skia doesn't honour properly (e.g. repeating-linear-gradient) or ends up generating PDFs from that don't work universally.
Re:Official Puppeteer Support for Firefox
by freedomben on Wednesday August 07, 2024 @03:45PM
(#41184664)
Indeed, Firefox uses PDF.js which I've found to produce really good results.
Doesn't PDF.js go the other way (convert a PDF into HTML-and-friends for display in a browser, instead of "printing" a page into a PDF)?
I haven't dug into it and am quite possibly incorrect, hence the request for confirmation!
Re:Official Puppeteer Support for Firefox
by freedomben on Wednesday August 07, 2024 @07:53PM
(#41186714)
Ah damnit, yes you're correct. Too late to edit my comment though.