Filozy

Guide

What actually changed between two PDF drafts

To see what changed between two versions of a PDF, compare the words, not the page images. A single word added to page one shifts every line after it, so a visual diff marks almost the whole document as changed; Compare PDF matches the pages of both drafts by content and lists the words added and removed on each page.

Tools used: Compare PDF filesExtract PDF pagesEdit PDF metadata

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:

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

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.

Questions people ask

Why does comparing two PDFs report so many differences?

Almost certainly because the comparison is visual. Adding one word near the top of a document pushes every following line down, and a pixel-based comparison sees each of those moved lines as changed. The document may have one real edit and a thousand reported ones. Comparing extracted text instead aligns the words themselves, so a line that only shifted down the page is not a change. Compare PDF compares page by page, though, so words pushed across a page break still show as removed from one page and added to the next, and a shift of around half a page can make whole pages show as removed and added.

Can a text comparison miss a real change?

Yes, and it is worth knowing which kinds. It will not see a changed image, a different colour, a resized logo, or a paragraph that was reformatted without rewording. It compares what the document says, not how it looks. For layout review you still need to look at the pages.

Why can I not compare a scanned PDF?

Because a scan holds no text — each page is a photograph, and there are no words to align. Run OCR over both files first to add a text layer, then compare those. Be aware that OCR errors will show up as differences even where the paper is identical.

Related guides