Reader mode producing big PDF files #5126
Replies: 3 comments
-
I suspect there's some important difference between what we do in our reader CSS and what Firefox does in theirs: https://searchfox.org/mozilla-central/source/toolkit/themes/shared/aboutReader.css - theirs https://github.com/tridactyl/tridactyl/blob/master/src/static/css/reader.css - ours but I can't see anything obvious immediately in the "print" directives. Is there any way you can tell what is making the files bigger? Is it just images or is there something else? |
Beta Was this translation helpful? Give feedback.
-
Definitively the big factor is image size. I checked the images inside a number of PDFs with pdfimages but my observations are inconsistent, sometimes the difference is really small. Other times PDFs generated from a website in Firefox reader mode have images shrunk down to 72 ppi (pixels per inch) while the website, viewed from the corresponding On a second thought, since the PDF printing is handled by the PDF.js library, I am unsure if there is wiggle room for Tridactyl to tune the file size. When I'll have more time, I can try to investigate further... |
Beta Was this translation helpful? Give feedback.
-
PDF.js gets some say but our CSS and readability.js also control it too |
Beta Was this translation helpful? Give feedback.
-
I use the reader mode of Firefox mostly to print clean PDF files. One great advantage of the Tridactyl reader mode is that images are not split across pages (when using the the Firefox reader mode I need to adjust the zoom level of the printing to minimize this inconvenience).
I notice that when printing to PDF from the Tridactyl reader mode view creates much bigger files than the native Firefox Reader mode. A few examples comparing the PDF files from both reader modes:
This website:
npr.org
It's not a huge problem because I always shrink the size of PDFs with ps2pdf, but are there levers I can use when using the Tridactyl reader mode?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions