cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dpa
New member
Status: Trending idea

Hello everyone...

I use Firefox a lot of years and i am very happy with the interface.

But i saw that there is no built-in option to change  the Mode of Embedded PDF Viewer in to Dark

Is possible to be implemented in the near Future...?

Thanks in advanced.

27 Comments
Agentvirtuel
Collaborator

Hello

If you'd like to try (and see) ui.systemUsesDarkTheme

Configuration Editor for Firefox
https://support.mozilla.org/en-US/kb/about-config-editor-firefox#w_adding-preferences
Adding preferences ui.systemUsesDarkTheme Number value 1

https://www.youtube.com/embed/JTkwNDFEViM

Toni
Making moves

@Agentvirtuel 

Thanks, but that does not change pdf to black background.

ETL
Making moves

@jscher2000 After Firefox v121 the pdfjs.viewerCssTheme pref does not work when resistFingerprinting is enabled.

buhbuhbob
New member

PDF viewing has an "invert colours" option

It would be nice to be able to invert the colours of PDFs, to be able to read white text on black backgrounds. Firefox extensions that invert colours are blocked on PDF viewing.

Jon
Community Manager
Community Manager

(Note: similar ideas have been merged into this thread)

mozzer
New member

Bookmarklet to force Dark Mode for Firefox PDF view

Add two scripted bookmarks, e.g. via Bookmark Manager in the URL field.

Name: force PDF Dark Mode
Url:

 

javascript:(()=>{window.PDFViewerApplication.pdfViewer.container.style.filter = "invert(85%) grayscale(0)" })();

 

 

Name: remove overrides; show PDF's styles
Url:

javascript:(()=>{window.PDFViewerApplication.pdfViewer.container.style.filter = "" })();

The advantages (if you like them):

  • Apply on a per-window basis, so you only restyle documents that need it
  • Sync bookmarks to multiple machines
  • Forget machine-specific folder digging
  • No Firefox restart required

Thanks to @Ethab83 for the script. I modified to use 85% contrast and to make it a button-click instead of opening the dev console.

Agentvirtuel
Collaborator

Hello

Of course, this is not the expected answer, however, this possibility to come.
https://connect.mozilla.org/t5/ideas/black-background-for-reader-view/idc-p/56833#M33280

1.png

shivaprasad
Strollin' around

doqment PDF Reader: Firefox's PDF viewer with reader mode

I created a PDF reader extension, building on top of the embedded viewer, that can display PDFs in different light and dark themes, just like @ArkitectNaut said in their comment. This might be the solution you are looking for. Please try it out!

https://addons.mozilla.org/en-US/firefox/addon/doqment/

Bonus point: it is available also for Android!

PDF in Firefox dark themePDF in Firefox dark themePDF in Firefox light themePDF in Firefox light theme

alexfromapex
New member

I tried to create an add-on for this but it's not able to run on the PDF viewer pages, so for now the bookmark looks like the only option

ostman
New member

really good idea. i am waiting for it

wolfmaster010
New member

Firefox just removed the CSS solution for contenteditable. I think this removed the functionality of both toolkit . legacyUserProfileCustomizations . stylesheets option and userContent . css.

"The -moz-user-modify CSS property has been removed. This property has been deprecated in favour of the contenteditable global attribute."

Anyone know how to set up the new contenteditable?

jscher2000
Leader

Hi wolfmaster010, as far as I can tell, both the toolkit.legacyUserProfileCustomizations.stylesheets preference and the option to use a userContent.css file are still present in Firefox.

contenteditable is an attribute, not a style property, so you cannot apply contenteditable using CSS. See: https://developer.mozilla.org/docs/Web/HTML/Global_attributes/contenteditable

If you are asking about this for a different reason than applying a dark mode to the built-in PDF viewer, I suggest starting a new discussion over here: https://connect.mozilla.org/t5/discussions/bd-p/discussions