PDF Dark Mode in FirefoxBeyond the about:config Hack

Firefox's PDF.js viewer only darkens the toolbar — pages still render on white. Drop your PDF below for an actual dark copy — no extensions, no config flags.

No about:config edits Images stay in color Download as new PDF Works on Firefox Mobile

Why Firefox's dark mode stops at the toolbar

PDF.js is intentionally conservative with page rendering — here's why, and what actually works.

PDF.js renders the page faithfully

PDF.js treats a PDF as authoritative — if the page background is white, it paints white. That's the right default for print/review work, but it's also why a “toggle” dark mode would be contentious: Mozilla would have to choose a color-inversion strategy that works for every document in the world. They haven't.

about:config → pdfjs.viewerCssTheme

This one comes up on every forum. Setting it to 2 darkens the chromearound the PDF — the toolbar, the sidebar, the page border. The page canvas itself stays white. It's a cosmetic fix dressed up as a feature.

Dark Reader and similar extensions

These apply a CSS filter on top of the rendered page. The result is the same as naive invert: photos become negatives, diagrams get mangled, and PDFs with any non-white background render unpredictably. Dark Reader itself notes limited PDF support in its documentation.

What PDF Dark does differently
  • Uses the same PDF.js underneath — so compatibility is identical to Firefox
  • Post-processes each rendered page pixel by pixel, detecting images by saturation before applying the theme
  • Produces a downloadable dark PDF — no about:config, no extension, and no dependence on the Firefox session
  • The file never leaves your browser; check DevTools → Network

Using this tool in Firefox

  1. Scroll up to the drop zone, or refresh the page.
  2. Drop a PDF from your desktop, Downloads folder, or any file picker. Firefox will hand it to the page via the File API — no upload happens.
  3. The pages render in your tab. Pick a theme: Midnight, Sepia, Solarized, or OLED.
  4. Click Download. Firefox saves the dark version to your Downloads folder. Open it in Firefox again or hand it off to another reader — it stays dark.

Works on Firefox for Windows, macOS, Linux, and Android. Needs Firefox 90+ (Web Workers + OffscreenCanvas support).

FAQ

Does Firefox have a built-in PDF dark mode?

Partially. Firefox uses the PDF.js renderer, which supports a dark UI theme for the toolbar — but the actual page content still renders on a white background. There's no public preference to change the page canvas.

What about the about:config pdfjs.viewerCssTheme hack?

Setting pdfjs.viewerCssTheme to 2 does darken the toolbar and the area around the page, but the page itself stays white. It's a cosmetic fix, not a real one.

Do Firefox dark-mode extensions help?

Barely. Most Firefox extensions apply a CSS filter over the rendered PDF, which inverts images the same way it inverts text — you get photos as negatives and charts become unreadable. Dark Reader (the popular one) explicitly notes PDF support is limited.

Why is this page using PDF.js too?

Yes — we also use Mozilla's PDF.js for rendering. The difference is we render each page to a canvas, then apply a saturation-based color algorithm that treats text and images differently before reassembling the PDF. Same rendering library, very different post-processing.

Does this work on Firefox for Android?

Yes. Firefox on Android supports file upload and Web Workers. The conversion runs on your phone, saves to your Downloads folder, and the dark PDF opens in any reader afterwards.

Is the original PDF uploaded anywhere?

No. Everything runs in your Firefox tab. You can confirm this via Firefox DevTools (Ctrl/Cmd + Shift + E) — no upload request is made for the file.