Two versions of a contract land in your inbox. Somewhere in forty pages, something changed. Finding it by reading is a poor use of an afternoon, and a poor use of your attention — the eye slides over the sentence that matters.
The obvious tooling makes this worse rather than better, and it is worth understanding why before trusting any result.
Why PDFs are hard to compare
A Word document knows it contains paragraphs. It can track changes because it has a model of its own structure — this sentence belongs to that paragraph, which belongs to that section.
A PDF has none of that. It is a set of drawing instructions: place this glyph at these coordinates, in this font, at this size. There are no paragraphs. Often there are not even words — just individual characters positioned on a grid, which a reader reassembles into text when you select it.
So a PDF cannot tell you what changed, because it does not know what it contains. Any comparison has to reconstruct meaning first, and there are two ways to attempt it.
The visual approach, and its failure
The intuitive method, used by tools such as diff-pdf, is to render both files to images and compare pixels. It sounds authoritative — it catches everything.
That is precisely the problem. Consider a forty-page report where someone inserted the word “not” into the second sentence. That word pushes the rest of the line right, which pushes the last word to the next line, which shifts every following line down, which reflows every subsequent page.
The comparison dutifully reports thousands of changes. One of them matters. You are back to reading forty pages, now with highlighting that actively misleads you about where to look.
Visual comparison has further traps: the two files may have been produced by different software, with different font rasterisation, so identical text renders with different pixels. Antialiasing alone can light up a whole page.
The text approach
The alternative is to extract the text from both documents and align the two sequences, reporting insertions and deletions — the same technique that shows changes in source code.
Compare PDF works this way: it matches the pages of the two drafts by their content, then compares each pair of pages word by word. Inserting “not” shows as one insertion where it was typed, and a page inserted whole does not make every later page look rewritten. Because each page is compared on its own, reflowed text still leaves some noise: words pushed over a page break are reported as removed at the end of one page and added at the top of the next, and an insertion or deletion of around half a page can stop the later pages matching at all, so they are listed as removed and added in full. When the last removal on a page and the first addition on the next are the same words, nothing was rewritten there.
This matches how people actually review: what does it say now that it did not say before?
The same idea works with other tools. On the command line, run pdftotext on both files and diff the two text files; an open-source script, pdfdiff, does both steps. Desktop editors such as Adobe Acrobat Pro (Compare Files) and Right PDF Pro compare the visual content as well as the text, and report the differences. Compare PDF is the free route with nothing to install: it runs in your browser and writes a Markdown list of changes rather than a marked-up PDF.
What text comparison will not catch
Being honest about the limits is what makes the tool usable:
- Image changes. A replaced chart, a different photo, an altered signature graphic — invisible to a text comparison.
- Formatting. Bold to regular, a colour change, a different font size. The words are the same, so nothing is reported.
- Layout. A reflowed table that keeps all its values. Same text, very different document.
- Anything in a scan. No text layer, nothing to compare. Run OCR PDF over both first.
For a contract or a policy, text comparison answers the question almost completely, because what matters is the wording. For a designed document — a brochure, a report with charts — you need both methods, or a careful look at the pages.
A step worth taking first
Before comparing, check where the files came from. PDF metadata shows the producer and the creation date of each.
This sounds fussy and repeatedly proves useful. Two files produced by the same software from the same source will compare cleanly. A file that has been printed, scanned and re-saved compares badly against its own original, because its text layer came from OCR and is full of small recognition differences that have nothing to do with editing.
Knowing that in advance tells you whether to trust a noisy result or investigate it.
Narrowing the comparison
For a long document where you know roughly where to look, comparing everything wastes effort and buries the signal.
Use Extract PDF pages to pull the relevant section out of each file, then compare those. The chosen pages are copied directly, so the text layer is preserved exactly — you are comparing the same bytes, just fewer of them. A five-page comparison you can read carefully beats a forty-page one you skim.
Reading the result
- Check the start and end. Truncated extraction is a real failure mode, and it looks like a large deletion at one end.
- An entire section reported as changed usually means it moved, not that it was rewritten. Read the first line of it in both files.
- Many tiny differences — a letter here, a space there — is the signature of an OCR’d file, not an edited one.
- Confirm a change you care about by opening both documents to that page. The comparison points you at the sentence; your judgement decides whether it matters.
Both files stay on your device throughout. For a contract under negotiation or an unreleased draft, that is not a detail — it is the reason to avoid a comparison service that asks you to upload both versions of something confidential.