This content originally appeared on DEV Community and was authored by Aditya DS
Dear dark mode lovers,
In this article I present a few hacks to view PDFs in dark mode on any browser! 🔥
To get started, open any PDF in your favorite browser. Then open the dev tools by using the shortcut ctrl + shift + I
or f12
and run one of the following in the console based on your browser:
New Microsoft Edge/Google Chrome/Brave/Opera
document.embeds[0].style.filter = 'invert(0.95)';
Firefox
document.getElementById('viewerContainer').style.filter = 'invert(0.95)';
Here is the result after running the script:
💡 You can change 0.95 to any number between 0 and 1.
If you found this useful, like the post and share it with your friends!
Thanks!
This content originally appeared on DEV Community and was authored by Aditya DS
Aditya DS | Sciencx (2021-10-18T14:15:56+00:00) Browser hacks for Dark Mode in PDFs! 🦉. Retrieved from https://www.scien.cx/2021/10/18/browser-hacks-for-dark-mode-in-pdfs-%f0%9f%a6%89/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.