4 ms·
Are there any advantages to using Firefox over Chrome for exporting PDFs with Puppeteer?
by mstijak 2y ago
Are there any advantages to using Firefox over Chrome for exporting PDFs with Puppeteer?
- lol768 2y agoI'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.
- freedomben 2y agoIndeed, Firefox uses PDF.js which I've found to produce really good results.
- mook 2y agoDoesn'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!
- freedomben 2y agoAh damnit, yes you're correct. Too late to edit my comment though.
- ak217 2y agoThat is correct, pdfjs is not usable for printing. Chrome uses Skia for printing, not sure what Firefox uses.