M BUZZ CRAZE NEWS
// general

How to invert colors in preview pdf option of mozilla Firefox?

By John Parsons

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.

2 Answers

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.

enter image description here

1

enter image description here


Method 1 (may not work)

  1. Install Stylus.
  2. Install this style.

Method 2

  1. Set toolkit.legacyUserProfileCustomizations.stylesheets to true in about:config and create a file in .../Firefox/Profiles/$PROFILE_DIR/chrome/userContent.css.

  2. Paste the following into userContent.css:

    @-moz-document regexp("^https?://.*\\.pdf(\\?[^\\./]*)?$") { .pdfViewer .page { filter: invert(0.95) hue-rotate(180deg); border: 9px solid #00DEAD00 !important; }
    }
3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy