PdfEditorOnlineFree

3 min readGuides

Get a clean scan from a phone photo without a scanner app

How perspective correction turns an angled photo into a flat page, what lighting and background choices decide the result, and how to build a multi-page PDF from captures.

Photograph the page flat with even light and a contrasting background, then let edge detection find the page corners and warp the image back to a rectangle. Contrast normalisation removes shadow and paper tint, and the corrected captures are assembled into a multi-page PDF locally, so identity documents never leave the device.

  • Perspective correction is what separates a scan from a photograph of paper; without it, edges taper and text skews.
  • Shoot on a contrasting background so edge detection can find all four corners reliably.
  • Diffuse indirect light beats bright direct light, because the enemy is shadow and glare rather than darkness.

Most documents that need scanning are scanned at the worst possible moment: a form due today, a receipt for an expense claim, an ID for an application, and no scanner anywhere. A phone camera is entirely capable of the job, provided the photo is treated as raw input rather than as the finished result.

What separates a scan from a photograph

Hold a phone over a page and you never get a rectangle. You get a trapezoid, because the camera is at an angle and the far edge is further away than the near one. Add the shadow of your own head, a warm tint from the room lighting, and whatever is on the desk around the page.

The document scanning tool addresses each of those in turn:

  • Edge detection finds the four corners of the page in the frame.
  • Perspective correction warps that quadrilateral back into a true rectangle, which is what makes text sit on straight horizontal lines again.
  • Cropping discards everything outside the page.
  • Contrast normalisation flattens the lighting gradient so white paper is actually white across the whole page rather than white at one end and grey at the other.

The output looks like it came from a flatbed. It is also dramatically smaller than the original photo, because a normalised page compresses far better than a photograph full of subtle shading.

Capture habits that decide the outcome

Correction can only work with what the sensor recorded. Five things matter, in roughly this order:

  1. Background contrast. Put the page on a dark surface. White paper on a white table gives edge detection nothing to find, and it is the single most common reason corners are missed.
  2. All four corners in frame. Leave a margin of background around the page. A corner cropped out of the frame cannot be detected, and the correction fails or guesses.
  3. Even, indirect light. Face a window, or use general room light. Direct overhead light puts your own shadow on the page; a flash produces a hotspot in the middle and dark edges. Glossy paper is worst — angle slightly to move the reflection off the text.
  4. Flat paper. Smooth out folds and hold curling pages down at the edges. A curved page cannot be flattened by a transform that assumes a plane, and text near the bend stays distorted.
  5. Focus and stillness. Tap to focus on the text, brace your elbows, and take the shot after the preview settles. Motion blur is unrecoverable.

Hold the phone roughly parallel to the page rather than leaning over it. Mild angles correct beautifully; a photo taken from 45 degrees loses real resolution on the far edge, and no amount of processing puts it back.

Building a multi-page document

For anything longer than one page, capture the whole set before assembling. That keeps the lighting consistent, which matters more than it sounds — a document where every page has a slightly different tone reads as sloppy.

Then:

  • Check each capture at full zoom before adding the next. Reshooting one page immediately is trivial; discovering it tomorrow is not.
  • Keep pages in order as you go rather than sorting afterwards.
  • Watch for pages that are technically legible but faint. Anything you have to squint at will be worse after printing.

If you already have a folder of correct images from another source, the image to PDF tool assembles them directly, and the assembly guide covers page sizing and ordering.

Make it searchable, then check it

A corrected scan is still a picture. Nobody can search it, and a screen reader gets nothing from it.

Run optical character recognition over the finished document to add a text layer behind the images. Good preprocessing is exactly what recognition wants, which is why doing the scan properly pays off twice — the OCR guide goes into what accuracy to expect and how to verify it.

Why local processing matters here specifically

Think about what actually gets scanned with a phone: passports, driving licences, bank statements, medical letters, signed contracts, children's school forms. It is close to a complete inventory of the documents that would be most damaging to leave on an unknown server.

Because the correction is ordinary image processing, a browser can do all of it on the device holding the photo. There is no step in this workflow that requires a copy of your passport to exist anywhere else.

Tools used in this guide

Each workspace runs in this browser tab. Open one directly to apply the steps above to your own document.

Written by The PdfEditorOnlineFree team. Published . Product behaviour described here reflects the linked workspaces at the time of review; check the tool page for current limits.