RedesignPDFRedesign PDF with AIBeautify PDFEdit Non-Editable PDFEdit Scanned PDFEdit PDF Text (Free)Add / Replace LogoClean Up Scanned PDFEnhance PDF QualityDarken Faded PDFRemove Background (Free)Remove ShadowsDeskew & PerspectivePure Black & WhitePDF Dark ModeChange PDF ColorFlatten PDFOCR PDF (Searchable)View all free PDF tools →BlogPricingUpload

Scan Cleanup · 2026-12-06 · 11 min read

Darken Light Text in a Scanned PDF (Keep Paper White)

Global contrast is the wrong first move on a faded scan. Here is how to separate paper from ink, darken the text, and keep a red stamp from turning into a black blob.

A faded scanned page next to the same page with dark text and a clean white background

A scanned PDF is a photograph of paper. There is no text layer to select, no font size to change, and no color swatch called "toner." When someone says the scanned PDF text is too light to read, they mean a pixel problem. I work on RedesignPDF, and this is the job that taught me why the contrast slider is the wrong first move.

A scan usually contains more signal than it seems. The paper is bright, the ink is darker, and the gap has been compressed by exposure, low toner, JPEG compression, or a shadow. The job is to widen that gap without turning the paper gray or the red stamp into a black blob.

Why scanned text looks light

A clean flatbed scan might put paper at 240 and ink at 40 on an 8-bit scale. A faded photocopy might put paper at 225 and ink at 165. The text is still darker than the paper, but the gap is only 60 levels. At 100 percent zoom, that reads as gray mush.

Low toner, underexposure, a phone shadow, JPEG compression, and repeated resizing all compress the gap. Pencil, thermal receipts, and old faxes start with a weaker signal. This is why "scanned PDF text too light to read" is not one problem. A page can be uniformly faint, faint on one side, or faint because the paper itself is gray.

Why the contrast slider makes it worse

A global brightness or contrast control moves the whole histogram. It does not know which pixels are paper, which are ink, and which are a stamp.

Take a typical 8-bit scan with paper at 225, text at 165, a shadow at 200, and a red stamp at RGB 180, 30, 40. The stamp's luminance is about 63, because green contributes most of the perceived brightness. Apply a level curve with a black point at 55 percent and a white point at 92 percent. The text gets darker. The paper gets lighter, but at 229 it is still light gray. The shadow at 200 becomes a gray band at 162. The stamp at 63 falls below the black point and clips to black.

That is the result people notice. A red approval stamp becomes a dark gray blob. A blue signature becomes a black smear. A color-coded chart loses the difference between a warning and a normal value.

PixelOriginalGlobal levelFlat-field plus mask
Paper225229248
Body text1656738
Soft shadow200162246
Red stamp180, 30, 400, 0, 0178, 32, 42

The numbers are an illustrative 8-bit example, not a promise about your scan. The pattern is what matters. A global level can darken the text and still leave the shadow gray. It can also clip a saturated color because it only looks at luminance.

Set the white point too low and the paper clips to white, taking a light gray table border or a pencil signature with it. Set the black point too high and thin strokes break into dots. The page looks dirty even though the text is darker.

The right model: paper, ink, and color

The paper is the background. The ink is the signal. The stamp or signature is a color layer that needs protection.

Flat-field correction estimates the background illumination and divides it out. Blur a copy of the page so the text disappears into a smooth map of the paper, then divide the original by that map. The lighting evens out and the paper moves toward white. A final normalize or level pass sets the black and white points.

That handles gray cast and shadows. It does not handle a red stamp, because the stamp is foreground. Build a saturation mask instead. The mask is white where color is strong (the protected stamp) and black where the page is neutral paper and text. Composite the original page over the darkened page through that mask so white areas keep the original stamp and black areas use the darkened text.

This is more work than dragging a slider. It is also the difference between a page that looks clean and a page that looks like a photocopy of a photocopy.

The free command-line route

You need Poppler, ImageMagick, img2pdf, and OCRmyPDF. On macOS:

brew install poppler imagemagick img2pdf ocrmypdf

On Debian or Ubuntu:

sudo apt install poppler-utils imagemagick img2pdf ocrmypdf

Debian and Ubuntu usually install ImageMagick 6 from apt, where the binary is convert (and composite for standalone compositing) rather than magick. The step commands below use ImageMagick 7 (magick). If magick is not found, you are on IM6: swap magick for convert (the three-image base overlay mask -composite order is the same in convert and magick; note that standalone composite swaps the first two arguments). The -colorspace, -channel, -level, -blur, -morphology, -compose, -threshold, \( ... \) grouping, and +clone flags below are unchanged.

The commands assume a Unix-like shell. On Windows, use WSL.

Step 1: rasterize at 300 DPI

mkdir -p scan-pages
pdftoppm -r 300 -png -progress input.pdf scan-pages/page

Use 300 DPI for body text, 400 for 6-point footnotes or thin pencil, and 200 only for a quick preview. More resolution means slower commands and a larger PDF.

Step 2: try a plain level curve first

magick scan-pages/page-1.png \
  -colorspace Gray \
  -level 55%,92% \
  scan-pages/level-1.png

The two percentages are the black point and the white point. 55% maps everything at or below 55 percent of the range to black. 92% maps everything at or above 92 percent to white. The values between are stretched across the full range.

This works on a page with even lighting and no color marks. Tune the white point to the paper, not to your hope. If the paper reads 225, a white point at 92 percent (235) leaves it light gray. A white point at 88 percent (224) makes it white but may clip a pale table border. The black point should sit above the paper noise and below the lightest text you need to keep.

Step 3: flatten the lighting when the page has shadows

magick scan-pages/page-1.png \
  -colorspace Gray \
  \( +clone -blur 0x35 \) \
  -compose divide -composite \
  -normalize \
  scan-pages/flat-1.png

The blurred clone is a rough map of paper brightness. Dividing the original by that map removes the gradient. The normalize pass stretches the result so the paper is white and the ink is dark. At 300 DPI, 0x35 is a starting radius. Too small and the blur follows the letters. Too large and it misses a shadow under a folded corner. Flat-fielding can amplify sensor noise, so check a grainy page before the batch.

Three crops of the same scanned page comparing Original, Global Levels with a gray cast, and Flat-Field Division + Levels with clean white paper
Three crops of the same scanned page comparing Original, Global Levels with a gray cast, and Flat-Field Division + Levels with clean white paper

Step 4: protect the red stamp with a mask

magick scan-pages/page-1.png \
  -colorspace HSL \
  -channel S \
  -separate +channel \
  -threshold 25% \
  -morphology Dilate Disk:1.5 \
  scan-pages/mask-1.png

In HSL, the S channel is saturation. Thresholding at 25% turns strongly saturated stamp pixels white and neutral paper and text black, and -morphology Dilate Disk:1.5 expands the white stamp mask slightly so red edges do not pick up dark halos.

Now make the leveled page and composite the original over it through the mask:

magick scan-pages/page-1.png \
  -colorspace Gray \
  -level 55%,94% \
  -colorspace sRGB \
  scan-pages/level-1.png

magick scan-pages/level-1.png \
  scan-pages/page-1.png \
  scan-pages/mask-1.png \
  -composite \
  scan-pages/out-1.png

In ImageMagick's three-image -composite (base overlay mask), white in the mask picks the overlay and black picks the base. Putting level-1.png first (base) and page-1.png second (overlay) means black mask areas keep the darkened text and paper, while white mask areas preserve the original red stamp.

A faded pink stamp may have low saturation and slip through. Lower the threshold from 25 percent to 12 or 15 percent and check. If it is still partly darkened, paint the mask by hand for that page. No automatic threshold works for every ink and scanner.

Original scan crop, black-background white-stamp saturation mask, and masked output keeping the red stamp colored while darkening the text
Original scan crop, black-background white-stamp saturation mask, and masked output keeping the red stamp colored while darkening the text

Step 5: rebuild the PDF and add OCR if you need it

img2pdf --output input-darkened.pdf scan-pages/out-*.png

Check the page count and size:

pdfinfo input.pdf | grep -E 'Pages|Page size'
pdfinfo input-darkened.pdf | grep -E 'Pages|Page size'

If the pages are the wrong size, force A4 for a uniform document:

img2pdf --pagesize A4 --output input-darkened.pdf scan-pages/out-*.png

Do not force A4 on mixed sizes. If you want a searchable PDF, OCR the darkened page while it is still dark text on white paper:

ocrmypdf --force-ocr --output-type pdf input-darkened.pdf input-searchable.pdf

OCR after darkening works because the background is still light. If you later invert the page for dark mode, OCR the light version first. Most OCR engines expect dark text on light paper.

The browser route

The command line gives you control, but it asks you to install four tools and tune three numbers per page. We built Darken Scanned PDF for the shorter path.

The page has two lanes. The 0-credit Contrast and Pure B&W controls are local adjustments for evenly faded ink. The AI darkening path is for ink too faint for a level curve, and it costs 2 credits per page. Visitors get 2 free AI pages before sign-in, then 3 more after a free sign-in, which is 4 plus 6 credits and 5 AI pages.

Start with the free lane. Upload the PDF, pick the page, and try Contrast. For a gray cast or shadow, use the 0-credit White BG and Deskew controls on Clean Up PDF Scan, which also fix the page angle. For a stain or crease, the AI cleanup on that page is 2 credits. Then darken the ink.

The 0-credit Clean bg and Brightness & Contrast controls with Protect colored photos, charts & stamps checked, producing dark text on white paper while keeping the red APPROVED stamp intact
The 0-credit Clean bg and Brightness & Contrast controls with Protect colored photos, charts & stamps checked, producing dark text on white paper while keeping the red APPROVED stamp intact

If the free controls are not enough, run AI darkening on one page. Check the red stamp, signature, totals, and smallest text before the rest. The AI path redraws the page as an image. It can change a thin stamp edge, a handwritten date, or a small account number. It cannot recover a stroke that is not visible. The export is a visual PDF, not Word or an AcroForm.

Use the browser when you need a result without a toolchain, or when hand-masking color marks would take too long. Use the command line for a batch of similar pages.

Which method should you use?

ProblemFirst tryWhy
Uniformly faint text, even lightingGray level curveFast, predictable, no mask needed
Gray cast or shadow across the pageFlat-field divideRemoves the lighting gradient before leveling
Faint text plus a red stampLevel through a saturation maskDarkens neutral ink, keeps the stamp color
Faint text plus a color chartMask or browser color protectionA global level will clip the chart
A page that is faded beyond recoveryAI darkening, then reviewIt can rebuild visible strokes, but it can also alter details

Every raster method loses the text layer. Add OCR after cleanup if you need search, and check a few numbers. For a fully editable source, keep the original scan.

A verification routine

Judge the result at 100 percent zoom, not on a phone screen at arm's length.

First, look at the smallest text. If the strokes are broken or the counters inside letters are filled, the black point is too aggressive. Back it off by five percent.

Second, look at a light gray table border or a pencil line. If it has vanished, the white point is too low. You have clipped detail that the reader may need.

Third, compare the red stamp before and after at the same crop. Check the hue, not just the presence of a mark. A stamp that is still red but two shades darker may be acceptable. A stamp that is now black is not.

Fourth, search for a known phrase. If OCR was part of the job, a failed search means the text layer did not survive. Check a number and a name, not just a common word.

Fifth, print one page on plain paper. A page that looks white on a backlit screen can print as a gray rectangle. If the print is gray, the white point is still too high.

When not to use this workflow

Do not use a contrast curve on a document where the faint mark is the point. A pencil signature, a light security watermark, or a carbon-copy entry may be the only evidence that something happened. Darkening the page can make the text readable and the evidence unrecognizable.

Do not use it on a file that needs a valid digital signature. Rasterizing changes the bytes and invalidates the signature. Do not use it on a PDF/A archive without checking the conformance requirements. Do not use it to "restore" text that is not there. A level curve can amplify a faint stroke. It cannot invent a stroke that the scanner never captured.

For a document with a red stamp, test the mask on one page before you process the batch. For a document with a color chart, test the chart legend. For a legal or medical record, keep the original and put the darkened copy in a review folder with a note about what changed.

FAQ

How do I darken light text in a scanned PDF without making the background gray?

Set the white point just below paper and the black point just above paper noise. Flat-field first if lighting is uneven. If a red stamp is present, apply the level through a saturation mask.

Why does increasing contrast turn my red stamp black?

A level curve works on luminance. A red stamp has low green and blue, so it can fall below the black point and clip. A saturation mask applies the change only to neutral ink and paper.

Can I darken a scanned PDF for free?

Yes. The browser page has 0-credit Contrast and Pure B&W controls. AI darkening is separate at 2 credits per page, with 2+3 free pages (4+6 credits).

Will darkening make the scanned text searchable?

No. Darkening changes pixels, not the text layer. Run OCR on the darkened page while it is dark text on white paper, then search for a known phrase.

Can I fix a PDF where the text is too light to read?

You can improve visible strokes. You cannot recover text that is blank or lost. If a 150 DPI fax has no visible strokes, a new scan beats a stronger curve.

Does this work on phone photos of documents?

Yes, but fix geometry first. Deskew and correct perspective before leveling. A shadow is a lighting problem, so flat-field correction does more than a contrast slider.

Can I keep the original layout?

A raster rebuild keeps the position of visible elements but loses the text layer and vector data. The layout looks the same. It is no longer editable. Check page size and page numbers.

What about AI darkening and red stamps?

The AI path can preserve color, but it redraws the page. Inspect the stamp edge, signature, and small text before export. If the stamp is critical, use the masked local route or keep the original.

Need the red stamp to survive the contrast pass?

Try the 0-credit local Contrast or Pure B&W control first. For severe fades, AI darkening is 2 credits per page, with 2+3 free pages (4+6 credits).

Upload PDF in RedesignPDF Try with a sample PDF

AI Redesign & Edit

Redesign PDF with AIBeautify PDFEdit Non-Editable PDFEdit Scanned PDFEdit PDF Text (Free)Add / Replace Logo

Scan Cleanup

Clean Up Scanned PDFEnhance PDF QualityDarken Faded PDFRemove Background (Free)Remove ShadowsMake PDF look scanned

Free Local Tools

All Free PDF ToolsDeskew & PerspectivePure Black & WhitePDF Dark ModeChange PDF ColorFlatten PDFOCR PDF (Searchable)

Compare & Guides

Best AI PDF EditorsRedesignPDF vs AcrobatRedesignPDF vs CanvaBlog

Product & Legal

PricingPrivacy PolicyTerms of ServiceRefund PolicyAcceptable Use

Languages

English
RedesignPDFsupport@redesignpdf.com© 2026 RedesignPDF. All rights reserved.