ImagePDF.Tools
Technical

How to Clean Up and Whiten Dirty, Yellowed Scanned Book Pages in PDF

N
NikolaLast updated on October 19, 2026 · 5 min read

Summary

Turn yellowed, stained scanned book pages white again. Levels, adaptive black and white thresholds, ScanTailor and Acrobat, and how to rebuild the cleaned PDF.

The quickest fix is a Levels adjustment. Convert each page to grayscale, then move the white point down until the paper turns white. Everything as light as the paper, or lighter, becomes pure white, while the ink stays dark. For pages that are only text you can go a step further and convert them to pure black and white with an adaptive threshold, which also clears most stains and show-through and makes the file much smaller.

The awkward part is that a scanned PDF is really a stack of photos, one per page, and ordinary PDF editors cannot adjust them. The practical route is to get the page images out, clean them in a batch, and put them back into a PDF. Acrobat Pro can do a rougher version without leaving the file.

A yellowed, stained scanned book page beside the same page cleaned to a white background with dark text | ImagePDF.Tools
Same scan before and after: the paper tone, stains and spine shadow are pushed to white, the text is kept.

Where the yellow, gray and blotches come from

  • ●The paper really is yellow. Paper made from wood pulp yellows and turns brittle with age, and a color scan records that tone faithfully.
  • ●Shadow near the spine. A bound page curves away from the scanner glass near the binding, so that edge comes out darker than the rest.
  • ●Show-through. On thin paper, the text printed on the back of the page shows through faintly.
  • ●Stains and foxing. Old books collect water marks, fingerprints and the small brown spots known as foxing.

All of these have one thing in common: they are lighter than the ink. That is the whole basis of the fix. Find a brightness level between the darkest paper and the lightest ink, and push everything above it to white.

Match the method to the page

PageMethodResult
Plain printed or typed textAdaptive black and white thresholdWhite paper, black text, smallest file
Text with photos, maps or pencil notesGrayscale plus LevelsWhite paper, shading in pictures kept
Color plates, stamps, colored inkLevels in color, using the white point eyedropperNeutral white paper, colors kept
Book spreads with a dark gradient at the spineIllumination correction in ScanTailor or AcrobatEven background where a single white point fails
Different pages need different cleanup.

Step 1: get the page images out at full resolution

Open Extract Images from PDF and choose PNG as the format. In a scanned PDF each page is normally one embedded image, so you get the scans at the resolution they were made, with nothing re-rendered or recompressed. The tool works inside your browser, so a private document never leaves your computer.

Some scanning software splits each page into separate text and background images to save space. If your pages come out in pieces, render whole pages to images instead, at 300 DPI if your converter offers it. Give the files names with leading zeros, such as page-001.png, so they stay in order later.

Step 2: whiten the pages

GIMP or Photoshop, page by page

  1. 1.Unless the page has color you need, convert it to grayscale: Image > Mode > Grayscale in both GIMP and Photoshop. This alone removes the yellow cast.
  2. 2.Open Levels: Colors > Levels in GIMP, or Image > Adjustments > Levels in Photoshop.
  3. 3.Take the white point eyedropper (GIMP calls it Pick white point, Photoshop calls it Sample in image to set white point) and click a patch of paper that is a little darker than average, such as near a stain or the spine. Everything that light or lighter becomes white.
  4. 4.If the text now looks faded, drag the black point slider slightly to the right to darken it.
  5. 5.Export the page as PNG.

Check at 100% zoom before you move on. Pushing the white point too far eats thin serifs, hairlines in diagrams and light pencil notes in the margins.

ImageMagick, for a whole book at once

Once you know which settings suit your scans, ImageMagick applies the same grayscale and Levels change to every page in one command:

bash
# try the settings on one page first
magick page-001.png -colorspace Gray -level 10%,75% test.png

# then process every page into a folder called clean
mkdir clean
magick mogrify -path clean -colorspace Gray -level 10%,75% *.png

In -level 10%,75%, everything darker than 10% becomes black and everything lighter than 75% becomes white. If the paper still looks gray, lower the second number to 70% or 65%. If letters start to break up, raise it.

ScanTailor Advanced, for uneven lighting and book spreads

A single white point fails when one side of the page is darker than the other, which is normal near a book's spine. ScanTailor Advanced is free, open-source software made for book scans. It splits two-page spreads, straightens them, crops to the text block, and in its Output stage can even out the illumination before turning pages black and white. It also offers adaptive binarization methods (Sauvola and Wolf) and an adjustable despeckle filter for dust.

It works on image files rather than PDFs, which is why Step 1 matters, and it saves TIFF files. To turn those into PNG for the next step, run magick mogrify -format png *.tif in the output folder.

Acrobat Pro, without extracting anything

Acrobat Pro can enhance scanned pages in place. Open the Scan & OCR tool, choose to enhance a scanned document, and in its settings raise Background Removal. It works well on lightly tinted paper and gives you less control than Levels on heavily stained pages. Adobe moves these options around between versions, so look for Enhance in the Scan & OCR panel.

Step 3: rebuild the PDF

  1. 1.Open Image to PDF, add the cleaned PNG files, and check the page order. You can drag pages to fix it.
  2. 2.Save the new PDF.
  3. 3.If you need to search or copy the text, run OCR now, after the cleanup, so the recognition works from the cleaner pages.

Expect the cleaned file to be smaller than the original. A yellowed color scan has a slightly different value in nearly every pixel, while a whitened page is mostly identical white pixels, which compress far better. Dedicated scanning software goes further by storing pure black and white pages in compact bilevel formats such as CCITT G4, which is what ScanTailor uses for its black and white TIFF files by default.

⚠️

Keep the original scan. Whitening throws information away for good: faint pencil marks, watermarks, ownership stamps and the paper tone itself, all of which a researcher or a later, better cleanup might need. Store the untouched PDF next to the cleaned one.

Frequently asked questions

How do I get rid of text showing through from the back of the page?
Set the white point between the show-through and the real text, since show-through is almost always lighter. Next time you scan, put a sheet of black paper behind each page. It stops light passing through the page and reflecting the back side's print into the scan.
Should I scan in color, grayscale or black and white?
Scan in grayscale, or in color if the book has colored elements, at 300 DPI or more. Do the black and white conversion afterwards on the computer. A scanner's built-in black and white mode applies one fixed threshold at scan time, and if it eats faint letters you have to scan the page again.
Why is there still a gray band near the spine after Levels?
Levels applies one white point to the whole page, and the paper near the spine is darker than the white point you picked. Use a tool with illumination correction such as ScanTailor Advanced, or rescan with the book pressed flatter against the glass.
Will cleaning the pages make OCR more accurate?
It usually helps on stained or low-contrast pages, because the recognition engine has less background noise to misread as marks. Our OCR PDF tool already converts each page to grayscale and black and white internally before recognizing text, but it keeps your original page images in the searchable PDF, so whitening first is what makes the final file look clean.

Sources & references

This article was researched and written by Nikola, drawing on the following primary sources and documentation:

Ready to try it?

All tools run entirely in your browser, no uploads, no account required.

Extract Images from PDF