MozillaZine


Change background color for PDFs. [Linux.]

User Help for Mozilla Firefox
aik_au
 
Posts: 60
Joined: November 13th, 2016, 10:13 pm

Post Posted July 21st, 2021, 1:58 am

I am trying to make that #fffffff white less white, hurts in a dark room :-) I went through a bunch of recipes and addons which can change background for html (not always but quite often they do work) but none worked for PDFs. The maximum they can was sidebar or toolbar or background _around_ pages but not the pages themselves. Is it achievable at all?
Last edited by LIMPET235 on July 21st, 2021, 5:03 am, edited 1 time in total.
Reason: Added [Linux.] to the title.

morat
 
Posts: 4693
Joined: February 3rd, 2009, 6:29 pm

Post Posted July 21st, 2021, 6:18 am

Similar thread: viewtopic.php?f=38&p=14873910

Read replies by jscher2000.

You can change the pdfjs.textLayerMode pref to 0. That removes the shadow or double font in my test.

DISABLE: 0
ENABLE: 1
ENABLE_ENHANCE: 2

You can change the pdfjs.viewerCssTheme pref to 2 for dark theme.

AUTOMATIC: 0
LIGHT: 1
DARK: 2

Reference
http://searchfox.org/mozilla-release/source/toolkit/components/pdfjs/content/web/viewer.html
http://searchfox.org/mozilla-release/source/toolkit/components/pdfjs/content/web/viewer.js
http://searchfox.org/mozilla-release/source/toolkit/components/pdfjs/content/web/viewer.css

aik_au
 
Posts: 60
Joined: November 13th, 2016, 10:13 pm

Post Posted July 22nd, 2021, 9:51 pm

oh cool, this did it:

Code: Select all
canvas {
  filter: brightness(0.8) !important;
}


thanks!

Return to Firefox Support


Who is online

Users browsing this forum: Bing [Bot] and 4 guests