Skip to content
PDF Night Mode

Dark mode for scanned PDFs

Scans behave differently from born-digital PDFs, and a naive inversion shows it immediately as a field of bright dots. This deals with that first.

No account required. Preview free, then £0.99 per document.

Why plain inversion ruins a scan

A scanned page is a photograph of paper, and paper is never perfectly clean — dust on the scanner glass, faint creases, JPEG compression noise all show up as tiny dark specks that are barely visible against white paper. Invert that page directly and every one of those specks becomes a bright white or coloured dot against the new dark background — a scattering of bright stars across what should be a clean page.

Despeckling before inversion

Scanned and screenshot-like pages are detected and despeckled before the colours are transformed: an isolated dark dot that is clearly surrounded on all sides by paper, rather than part of a letter or a line, is smoothed away first. A genuine stroke of text is never touched, because a letter always has at least one dark pixel next to it along the stroke — only fully isolated specks qualify.

Full dark treatment for the page itself

Once despeckled, a scanned page gets the full dark treatment rather than the lighter touch used for photographs — because a scan of a document is a document, not a picture, even though it arrives as one big image. The background goes dark and the text on it goes light, same as a born-digital page.

Questions

Why does inverting a scanned PDF myself leave bright dots everywhere?

Dust and noise on a scan are barely visible as dark specks on white paper, but a plain inversion turns every one of them into a bright dot on the new dark background. This despeckles a scan before inverting it, specifically to avoid that.

Will text on the scan still be readable, or does despeckling blur it?

Text is not touched by despeckling. Only isolated dark specks fully surrounded by paper are smoothed away — a letter or line always has a dark pixel next to it, so it never qualifies as an isolated speck.

Does a scanned PDF keep selectable text after conversion?

No, not unless the scan already had a text layer from OCR before conversion — a scan is fundamentally an image. Conversion changes its colours; it does not add text recognition on top.

Is a scanned page treated the same as a photograph in the document?

No. A scanned document page is recognised as document-like rather than photographic and gets the full dark treatment — background pushed dark, text pushed light — rather than the gentler dimming used for actual photographs.

See also