I prefer the preview in Firefox option for PDFs, rather than downloading PDFs and then viewing them. However the default white background on the preview hurts my eyes. So is there a way that I can: preview PDFs in Firefox without having to download them and with inverted colors?
p.s.: "Dark background and light text" extension for firefox does invert the pdfs and it is good. But my default global preferences for this extension are different. Is there a way to tell the extension to "always invert pdfs". I add this as a footnote, because a solution that doesn't rely on this method is also welcome.
You are looking for an extension like this one.
It will make pages dark and text white, it even has some customization options and can be used on all pages or just one, I see no reason it would not work on PDF preview too, just open the menu and choose invert.
Method 1 (may not work)
Method 2
Set
toolkit.legacyUserProfileCustomizations.stylesheets
totrue
inabout:config
and create a file in.../Firefox/Profiles/$PROFILE_DIR/chrome/userContent.css
.Paste the following into
userContent.css
: