Y
Hacker News
new
|
ask
|
show
|
jobs
by
mstijak
685 days ago
Are there any advantages to using Firefox over Chrome for exporting PDFs with Puppeteer?
1 comments
lol768
685 days ago
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.
link
freedomben
685 days ago
Indeed, Firefox uses PDF.js which I've found to produce really good results.
link
mook
685 days ago
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!
link
freedomben
685 days ago
Ah damnit, yes you're correct. Too late to edit my comment though.
link
ak217
684 days ago
That is correct, pdfjs is not usable for printing. Chrome uses Skia for printing, not sure what Firefox uses.
link