Repository navigation
Replies: 3 comments 6 replies
|
Due to technical difficulties, that's not possible. |
|
If you use Firefox, you can edit userContent.css like this: @media (prefers-color-scheme: dark){
.pdfViewer{filter: invert(1) hue-rotate(180deg);}
}If you use Chrome or Edge, install the extention "PDF Reader", then edit the extention option like this: html[data-theme*="dark"] .pdfViewer{
filter: invert(1) hue-rotate(180deg);
} |
|
For people years later looking for how to control the PDF background color beside the pages in Chromium-based browsers, it's technically possible with another method. I have created PDF Dark Overlay for Chrome PDF Viewer for this. This uses Tampermonkey (although you can do it temporarily on the page); for easy repetition the next time you want to activate a clean dark mode together with the background. Adds sidebar masks and backdrop-filter over Chrome's PDF viewer, allowing tools like Dark Reader to have a clean dark PDF viewer without:
Drag the overlay edges to resize them or use the floating menu to adjust brightness and offset.
FIRST EXAMPLE (note, brightness can be tweaked, settings menu can be closed, also drag the sidebar's edges to adjust their width depending on magnification to hide the white background)
FULL DARK EXAMPLE (topbar brightness and sidebar brightness all the way down)
Tweaks automatically save per user, and defaults can be changed in the variables section. Requires Allow access to file URLs to reach file:/// or objects in files, as well as the Allow User Scripts so that Tampermonkey can run. USERSCRIPT LINK (get the Tampermonkey Chrome extension if you do not have it and add the requirements to run on files): GITHUB (if you want to see the code or full description): https://github.com/Artectdis/pdf-dark-overlay |







If you use Firefox, you can edit userContent.css like this:
If you use Chrome or Edge, install the extention "PDF Reader", then edit the extention option like this: