pdfblah.com

Guide

Clean up a scanned PDF

Gray paper, lighting gradients, coffee stains: scans carry all of it. Clean scan makes the paper pure white (#FFFFFF, not almost-white) and keeps the ink crisp. It was built for sheet music, and it works on any scan.

A 1924 sheet music scan before and after cleaning: gray paper on the left, pure white paper with crisp notation on the right

"All Alone" (Irving Berlin, 1924), a public domain scan. Left: the original. Right: after Clean scan. One click, under a second per page.

What it does

Each page is analyzed for its background: the paper tone, the lighting across the page, any stains. That background is divided out, then the levels are remapped so paper lands on exactly white while the ink keeps its anti-aliased edges. No thresholding artifacts, no thinned-out staff lines.

Do it online

  1. Open pdfblah.com and drop in your scan. It gets a scan badge.
  2. Click "Clean it up". The workbench notices the scan and offers the edit. (Or add it yourself: + Add an edit → Clean scan.)
  3. Check the After view. Flip Before/After to compare. Use strong for dark or stained pages, gentle if the scan is already close.
  4. Download. One clean multi-page PDF, sized for print or a tablet reader like forScore.

Batches, from the command line

A folder of scans takes one command. A 10-page PDF cleans in a few seconds.

pip install pdfblah

# one file
pdfblah clean scan.pdf clean.pdf

# a whole batch: one cleaned PDF per input, into cleaned/
pdfblah clean *.pdf -o cleaned/

# dark or stained pages
pdfblah clean scan.pdf clean.pdf --strength strong

# pure 1-bit black and white (smallest files)
pdfblah clean scan.pdf clean.pdf --bilevel

The tool is open source (MIT) and runs fully on your machine, so nothing is uploaded. See the pdfblah project on GitHub.

Tips