Blog · 2026-05-13 · 4 min
Blank page detection is a threshold problem
A page with one line of text covers less than a tenth of a percent of the sheet. Which makes 'is this page blank' much harder than it sounds.
Feed a hundred double-sided sheets through a scanner when half of them are printed on one side, and you get a document that is half empty pages. Finding them sounds trivial: a blank page has no ink on it.
Real scans are never that obliging.
Nothing is actually white
Paper is not white, it is faintly grey or cream. Scanners add sensor noise. JPEG compression adds speckle around the edges of nothing at all. The platen has dust on it. The sheet edge casts a shadow.
So a genuinely blank scanned page does not measure as zero ink. It measures as a small amount, and the question becomes: how small is small enough?
The number that surprises people
Here is the measurement that makes this hard. Take an A4 page with a single line of 24-point text on it, rendered at screen resolution. Count the dark pixels.
Under 0.1% of the page.
A page you would unhesitatingly call "not blank" — it has words on it — is 99.9% empty. Intuition says a threshold of 1% or 2% would be safely conservative. It is not conservative at all. It is more than ten times looser than a page of actual content, and it will classify a page with a paragraph on it as blank.
We got this wrong on the first attempt. A threshold of 0.2% — which sounds strict — reported every page of a test document as blank. A tool built on that would have deleted an entire scan and reported success.
Where the usable range sits
Hundredths of a percent. Around 0.02% tolerates dust, speckle and scanner noise while still catching a page with a single line on it, with a comfortable margin either side. That is a much narrower band than anyone expects, and it has to be found by measuring rather than by choosing a number that sounds cautious.
Two things help further:
- Ignore a border. Scanner artefacts collect at the sheet edges — shadows, feeder marks, the dark strip where the page did not sit flat. A page can be entirely blank in the middle and register ink around the rim.
- Report confidence, not just a verdict. A page just under the threshold is a different claim from a page with literally nothing on it, and the person deciding whether to delete it deserves to know which they are looking at.
Detection and deletion are different acts
The consequence of a false positive here is destroyed content, so the two should never be one button. Detect, show what was found, let a person look, then remove.
And if every page in a document registers as blank, the right response is not to produce an empty file. It is to stop and say the threshold is probably wrong — because it almost certainly is.