Working with scans

How do I edit the text in a scanned PDF?

You cannot edit a scan directly, because the page is a picture. OCR PDF recognises the words and rebuilds them as real editable lines on top of the original page, so you can correct a name or a figure and save a normal PDF.

4 min read

If someone sends you a scanned contract with your name spelled wrong, clicking on the name does nothing. There is no cursor because there is no text. The page is a photo.

People usually tell you to retype the whole document. You don't have to.

What editing a scan involves

Three things happen, in order, and each has its limits.

  1. The words are recognised. Optical character recognition looks at the picture and works out which characters it shows.
  2. They are put back where they were. The text and the position of every line, so a rebuilt page looks like the page it came from and not a block of loose sentences.
  3. The original stays underneath. The scan is still what you see. You are editing a layer of real text on top of it.

The third step is what makes the result usable. The logo, the signature, the stamp and the lines of the form aren't text and can't be recognised, so they stay exactly as they were.

OCR PDF does all three when you open a scanned document, and then behaves like the ordinary PDF Editor: click a line, type, save.

What it will not do

It will not match the typeface perfectly. A scan doesn't record the original font. It is ink in a picture. The rebuilt line uses the closest font we have, at the measured size and position. On a printed document this is usually unnoticeable in a line of body text and noticeable in a heading.

It will not hide the join on a textured scan. A page photographed on a phone carries shadow, paper grain and slight curvature. New, clean text placed on top has none of that. The edit is accurate, but someone looking closely can see it.

It will not fix what it could not read. A recognition error becomes editable text with the error in it. That is better than being stuck, since you can correct it, but you need to read the page and not assume it is right.

Numbers deserve a second look

Recognition mistakes aren't random. They happen between shapes that look alike. 1 and l, 0 and O, 5 and S, 8 and B, a comma and a full stop.

In a sentence that hardly matters, because your eye fixes the word as you read. In a total, an account number or a date it matters a lot, and that is where an error that looks right does the most harm. A figure that reads 1,500.00 when the paper said 7,500.00 is not a typo anybody notices.

Check every number against the original page before you save. The original is on the screen behind your edit, so this is easy.

Get the scan right before recognising it

Accuracy depends mostly on the scan, and you control most of that.

  • Resolution. 300 DPI when you scan. Below about 200 the letters have too few pixels to tell apart.
  • Straightness. A page scanned at an angle is much harder to read. Deskew it.
  • Contrast. Clean black on white. Grey photocopies and coloured backgrounds both hurt.
  • Flatness. A phone photograph of a curved page bends the lines, and bent lines recognise badly. Press the page flat, or scan it.

If what you have is already grey or speckled, Enhance Scan cleans it up first, and recognition works better afterwards.

Which languages

Eight: Bangla, English, Hindi, Spanish, Dutch, Arabic, Chinese and Russian. The language is detected from the page automatically. If you already know it, you can choose it before uploading, which is quicker and more reliable on a short page.

When retyping is faster

Do the sums first. Rebuilding pays off when you need to change a little of a lot: a name through a twelve-page agreement, a date on a certificate, a figure on an invoice.

It doesn't pay off for a handwritten page, a heavily designed page where the layout matters more than the words, or half a page of text you could retype in four minutes. Everyday OCR does poorly on handwriting, and no amount of cleaning changes that.

Common questions

Will anyone be able to tell the document was edited?

On a clean printed scan, usually not at a glance. On a textured or photographed page, a close look can show it: the original typeface is unknown and the new text doesn't have the paper's grain. The words are rebuilt accurately, but the page isn't restored to how it was.

Does the rest of the page change?

No. Only the lines you edit are redrawn. Logos, signatures, stamps and rules are part of the scanned image and are left exactly as they are.

Can I edit a handwritten document?

Not usefully. Everyday OCR is made for printed type and does poorly on handwriting, so what comes back needs more correcting than retyping would take.

Is the saved file a normal PDF?

Yes. It opens anywhere, and the text you added is real text that you can select and search, sitting on the original page.