Client-side PDF processing · pdf.js + pdf-lib

PDF Enhancer Online — improve PDF scans with brightness, contrast, and sharpness controls

Adjust brightness, contrast, and sharpness with a live preview, choose a preset, or let Auto-Detect suggest a starting point based on the current page.

See the four steps
Live split preview 3-slider control Luminance auto-detect Processed locally
Built & maintained by Bhavin J. Sheth | Updated

The enhancement console

Upload a PDF, adjust visual parameters with synchronized live feedback, and export your enhanced document at 150, 200, or 300 DPI.

Drop your PDF here

or browse files (Up to 100 MB · max 200 pages)

How enhancement actually works

Enhancement is three adjustments, not one filter

A scan may need more than one adjustment. Brightness, contrast, and sharpness address different visual characteristics, and the live preview lets you compare the combined effect before exporting.

Three sliders, one preview

A faded scan that is too dark to read, a photocopy that is washed out, or a phone photo of a document that came out soft are distinct visual issues. Addressing them with a single uncalibrated filter rarely gives predictable results.

The live preview and final export use the same brightness, contrast, sharpness, and grayscale processing functions. Export can be rendered at 150, 200, or 300 DPI with 96% JPEG compression, preserving original physical page geometry.

Every control and what it changes

Synchronized live preview

The "After" canvas renders pixel adjustments using the identical algorithm applied during final export.

Auto-Detect

Measures the current page's average luminance and sets an initial brightness and contrast baseline.

Three manual sliders

Brightness, Contrast, and Sharpness allow you to fine-tune edge definition and tone curve balance.

Preset starting points & DPI selector

Presets apply calibrated values, while 150, 200, or 300 DPI exports ensure the output PDF maintains full-resolution scan clarity.

Grayscale mode

Converts the page to grayscale. This can help simplify text-heavy scans, but will remove color accents.

Presets get you close, sliders get you exact

Start with a preset or Auto-Detect, then fine-tune with the sliders while watching the live preview.

1

Upload your PDF

Drag it onto the upload area or click Select PDF. File details and page thumbnails appear right away.

Click any thumbnail to jump straight to that page.
2

Choose enhancement options

Use the control panel and watch the "After" preview update:

Presets: Choose Light, Balanced, or Strong for an instant baseline.
DPI Quality: Choose 150, 200, or 300 DPI for your output file.
Sliders: Fine-tune Brightness, Contrast, and Sharpness by hand.
3

Apply and render

Select whether to apply settings to all pages or specific page ranges, then click Enhance PDF.

All processing happens locally in your browser memory.
4

Rename and download

Inspect the new file details, adjust the output file name if desired, and download the finished PDF.

150/200/300 DPI Export Client-side

Example enhancement: from faded scan to adjusted page

A low-contrast scan improved with balanced enhancement settings.

Original Faded scan
Original scanned PDF page before brightness, contrast, and sharpness adjustments

A dim, low-contrast scan with text that may be harder to read.

Enhanced
Enhanced Adjusted result
The same scanned PDF page after brightness, contrast, and sharpness adjustments

A sample result with adjusted contrast and sharpness. Results vary by source quality and settings.

Documents where legibility is essential

Common scenarios where digital document legibility needs direct improvement.

Common situations for enhancing a PDF, by user type
Use caseWhat enhancement solvesTypical user
Old document restorationBrighten and sharpen faded historical documents, letters, and manuscripts for digital archives.Archivists & librarians
Study material cleanupImprove scanned textbook pages and lecture slides for easier reading and subsequent OCR preparation.Students & researchers
Technical drawingsSharpen blurry schematics and architectural plans so fine lines remain distinguishable.Architects & engineers
Office document cleanupIncrease contrast on scanned receipts, invoices, and reports for clean record-keeping.Office administrators
Sheet music & scoresClean up digitized musical scores for clear rendering on tablets and monitors.Musicians
Phone-scanned documentsCompensate for soft focus and uneven ambient lighting in mobile document photos.Mobile professionals

Scroll horizontally if table columns exceed screen width

Controls explained

Three controls, one auto-detect, and how they function

Predictable parameters without black-box alterations — here is how each control adjusts the image data.

Brightness

Offsets pixel luminance values uniformly. Helps correct pages that were under-exposed or overly dark in original capture. Range is -50 to +50.

Contrast

Expands or compresses the distribution between highlights and shadows. Higher contrast distinguishes washed-out text from greyish backgrounds. Range is -50 to +50.

Sharpness

Applies an unsharp convolution kernel that accentuates high-frequency edge transitions. Emphasizes character borders already present. Range is 0 to 100.

Auto-Detect

Calculates standard sRGB luminance across the visible page canvas and applies a dark, neutral, or light preset baseline for further manual adjustment.

Enhancement presets & DPI

Light, Balanced, and Strong configurations apply pre-calibrated slider combinations, while selectable 150/200/300 DPI gives you control over the final PDF rendering resolution.

Color mode

Original Colors retains RGB color channels; Grayscale calculates uniform luminance values, removing color variance from monochrome reading materials.

When enhancement needs adjustment

Common visual symptoms and recommended adjustments.

Symptom
Why it happens
Recommended adjustment

Page appears washed out or blown out

Brightness or contrast is set too high for a document that already has light backgrounds.

Reduce Brightness toward 0 or negative values, or step down from Strong to Balanced enhancement.

Text displays prominent white halos

Sharpness is over-amplifying high-contrast boundaries, producing visible ringing artifacts.

Lower the Sharpness slider until character outlines appear natural without halo rings.

Auto-Detect baseline is not ideal

Auto-Detect measures global average luminance, which can be skewed by large dark margins or illustrations.

Uncheck Auto-Detect and manually adjust the sliders while monitoring the live preview.

Output PDF file size increased

Pages are re-rendered at 150, 200, or 300 DPI with 96% JPEG quality to preserve maximum sharpness.

Process the enhanced file through Compress PDF if smaller storage size is needed.

Password-protected PDF fails to open

Encrypted PDF documents cannot be decoded in-browser without supplying permissions password.

Unlock or decrypt the PDF using your authorized tool before uploading for visual enhancement.

Page range input error

A syntax error occurred in the page specification (e.g. out-of-range numbers or backwards ranges).

Specify valid comma-separated pages or ascending ranges such as 1, 3-5, 8.

Washed out / overexposed

Why: Brightness or contrast set too high.

Fix: Lower Brightness or choose Balanced enhancement.

Halos around text

Why: Sharpness slider value is too high.

Fix: Decrease Sharpness until edges look crisp and clean.

Sub-optimal Auto-Detect

Why: Global luminance calculation affected by image regions.

Fix: Adjust sliders manually using live preview.

Output file larger

Why: High-resolution 150/200/300 DPI page rasterization.

Fix: Compress file afterward if needed.

Password-protected PDF

Why: Encrypted files cannot be processed without authorization.

Fix: Unlock file first, then upload.

Page range input error

Why: Malformed page numbers.

Fix: Use standard ranges like 1-4, 7.

Achieving clear results without overprocessing

Recommended workflow steps for consistent quality enhancement.

Start with Balanced enhancement

Begin with Balanced enhancement, then compare the preview. Increase brightness or contrast only when needed, and raise sharpness gradually to avoid halos and amplified scan noise.

Use Auto-Detect as a baseline

Let Auto-Detect compute initial brightness and contrast, then fine-tune sliders against the live split preview.

Consider Grayscale for monochrome scans

Removing color channels often cleans up yellowed paper backgrounds on scanned documents and receipts.

Avoid over-sharpening artifacts

Start with a low or moderate sharpness value and inspect letter edges in the preview. Reduce sharpness if halos or background noise become more visible.

Spot-check multiple pages

Scan quality can differ throughout a PDF. Use the page navigation buttons to review pages before processing.

Retain the source PDF

Because page rasterization is baked into the exported document, keep your original file as an archival master.

PDF enhancer FAQs

Clear answers to questions regarding processing methods, security, and document handling.

Is it safe to enhance my documents here?

Your selected PDF is processed locally in your browser using client-side JavaScript libraries. The document is not uploaded to a remote server for enhancement. Internet access is only required to load the page and its libraries.

Will enhancing change the file size of my PDF?

The output PDF may be larger or smaller than the original. Enhanced pages can be rendered at 150, 200, or 300 DPI and are encoded with high-quality JPEG at 96% quality.

What is the difference between the enhancement presets?

The presets apply different brightness, contrast, and sharpness settings. Light enhancement is a gentler starting point, Balanced enhancement applies a stronger adjustment, and Strong enhancement applies the most aggressive preset. You can fine-tune the settings before exporting.

Does Auto-Detect use AI?

No. Auto-Detect measures the average pixel luminance of the current page and selects one of three preset brightness and contrast combinations. It is a deterministic rule-based calculation, not machine learning.

Does the exported PDF keep original searchable text?

Enhanced pages are re-rendered to high-resolution images to apply pixel-level filtering. Unselected pages are preserved directly from the original document.

Can I undo an enhancement after downloading the file?

No — the downloaded file is a newly generated document. Keep your original source file intact so you can re-adjust settings whenever needed.

Build notes

The write-up on how this was built

Because live previewing, brightness analysis, and final export run client-side, this article explains the underlying implementation and filter mathematics.

Published on freeCodeCamp

How to Build a Browser-Based PDF Enhancer Using JavaScript

Covers canvas-based brightness and contrast adjustments, unsharp convolution filters, and client-side page rendering pipelines.

Read the write-up on freeCodeCamp

Written by Bhavin Sheth · Founder, AllInOneTools