Dark Mode PDF viewing
Dark mode is great for using a laptop at night with minimal illumination from the screen. Support for dark mode is fortunately growing. E-book readers, text editors, terminal applications, and a growing contingent of web sites all support dark themes.
Viewing PDFs with a dark background is a little more difficult.
- Apple’s Preview doesn’t support a dark background for viewing PDFs.
- Apple’s Books application in Big Sur has a dark theme for e-books and can catalog PDFs, but opens PDFs in Preview.
- The developers of Skim sanctimoniously rejected a feature request for a dark background mode back in 2018.
- Inverting colors in the macOS accessibility settings results in a mouse cursor with garish glowing blue edges.
- PDF Expert supposedly has a dedicated night mode, but the paid version is $50/year and using even the free version requires creating an account to use local desktop software. It’s as if The Right to Read was taken as a design brief rather than as a warning.
There are two halfway decent solutions:
Negative Reader is a minimum viable solution to the problem but it feels clunky. There is no way to view document thumbnails or a table of contents. It would be much nicer to use a tool that at least had feature parity with Preview.
A Hacker News comment contains the best solution I’ve seen, and it modifies the Firefox’s PDF viewer’s behavior in one line of JavaScript.
I made the code into bookmarklets to toggle dark mode. Drag the links to your bookmarks bar, open a PDF, and click your new bookmark to turn out the lights:
- May 29, 2023 - This site now supports dark mode.
- June 16, 2023 - Updated bookmarklet to handle pdf.js PR #15930. Added light mode bookmarklet to switch back.