PaperDiff

Comparing scanned PDFs, and why it fails

If you have tried to compare two scanned documents and got "no differences found", or a result that made no sense, this is why, and it is not your fault or the tool’s. A scanned page does not contain text. It contains a photograph of text, and there is nothing in it for a comparison to compare.

This page explains how to tell whether a PDF is a scan, what the honest options are, and (the part that matters most) why a tool that silently reports a scan as "identical" is giving you the most dangerous answer it could give.

Originalthe earlier draft

or drop it here

.pdf · .docx · .txt · .md

Revisedthe one to check

or drop it here

.pdf · .docx · .txt · .md

Nothing is uploaded. Both files are read inside this tab.

How to do it

  1. 01

    Test it in two seconds

    Open the PDF and try to select a sentence with the mouse. If the text highlights word by word, there is a text layer and it can be compared. If you can only draw a box over the page, it is an image.

  2. 02

    Or just drop it here

    A PDF with no extractable text is detected and refused with a plain explanation, rather than being compared and reported as unchanged. If only some pages are scans, which is common in a signed agreement where the signature page was printed and re-scanned, the count of skipped pages is shown.

  3. 03

    Run it through OCR

    Optical character recognition adds a text layer under the image. Adobe Acrobat, macOS Preview’s export, Microsoft OneNote, Google Drive’s "open with Google Docs", and the open-source Tesseract and OCRmyPDF all do it. Once there is a text layer, the comparison works normally.

  4. 04

    Then read the result sceptically

    OCR makes mistakes, and its mistakes are character-level: a 1 read as an l, an O as a 0, a word mangled at the edge of the scan. Those appear as differences that were never in the document. Ignoring case and punctuation removes some of it. Nothing removes all of it, which is why a comparison of two OCR’d scans is a starting point rather than an answer.

Why "no differences found" is the worst possible answer to a scan

Think about what a comparison tool does with a document it cannot read. It extracts the text, gets nothing, extracts the text of the second document, gets nothing, compares nothing with nothing, and finds them identical. Then it reports exactly what it found: no differences.

That sentence is true about the data and catastrophically false about the documents. Somebody checking whether a countersigned agreement matches the version they approved gets told it does, on the strength of a comparison that read neither file. It is a failure that looks exactly like a success, and the only defence against it is for the tool to refuse rather than to answer.

So a PDF with no extractable text is reported as a scan, by name, and the comparison does not run. Where only some pages are images (the signed page of an otherwise digital contract, a scanned annex, a faxed schedule), the pages that could not be read are counted and shown, so a comparison of the remaining pages is not mistaken for a comparison of the document.

The same instinct applies to the smaller version of the problem. Two PDFs exported from the same source by different software often have small, systematic differences that are not edits at all: a curly apostrophe against a straight one, a ligature, a soft hyphen, a non-breaking space. Reported literally, those bury the real amendments under hundreds of false ones. They are folded away here before anything is compared, which is a decision about what counts as a difference, and the one on this page is the same decision made in the other direction: when the tool cannot answer, it should say so rather than produce something that reads like an answer.

Questions

How do I know if my PDF is a scan?
Try to select a sentence with the mouse. Text highlights word by word; an image lets you draw a box but select nothing. Another sign is file size: a page of text is tens of kilobytes, a scanned page is hundreds or more.
Will this site add OCR?
Possibly. It can be done in the browser, which would keep the no-upload promise intact, and how often scanned documents are actually brought here is measured: it is the single clearest signal of what to build next. It is not available today and the page says so rather than implying otherwise.
What if only the signature page is scanned?
The rest is compared normally and the unreadable pages are counted and reported, so you can see that the comparison covered 11 of 12 pages rather than all of them. That distinction is the whole point.
Can two OCR’d scans be compared reliably?
Usefully, not reliably. OCR introduces character-level errors that appear as changes which were never made, and the rate depends on the scan quality, the typeface and the language. Turning on "ignore case" and "ignore punctuation" removes a good deal of the noise. Treat the result as a list of places to look rather than as a finding.
Does a photograph of a document work?
No, for the same reason, and usually worse: a phone photograph has perspective distortion and uneven lighting on top of having no text layer. OCR it first, and expect more errors than from a flatbed scan.