How to Compare Two PDF Versions
“Here is the updated version.” No summary, no track changes, no note about what moved. Somewhere in forty pages a number changed, and it is your job to find it. Reading both documents side by side is how mistakes get signed.
Text comparison versus visual comparison
There are two different questions you might be asking, and they need different tools.
What words changed? Extract the text from both files and diff it, the way you would diff two versions of source code. This is what you want for contracts, policies, specifications and anything where the meaning lives in the sentences. It ignores reflowed pages, changed fonts and shifted margins, which is exactly right when those things do not matter.
What looks different? Render both files to images and compare pixels. This catches a moved logo, a changed chart, a different signature block — things a text diff cannot see. It also fires on every trivial reflow, so on a re-exported document it can report that all forty pages changed while the words are identical.
The comparison tool here does the first: it pulls the text out of both PDFs locally with pdf.js and runs a line-level longest-common- subsequence diff, reporting added, removed and unchanged lines with a downloadable report. For legal and specification review that is the question people actually have.
Where automated comparison misleads you
Believe the diff, but know its blind spots.
- A scanned page has no text. Compare two scans and you will get nothing, correctly and uselessly. Run OCR on both first — and then remember that residual OCR errors show up as fake differences.
- Moved text reads as deleted plus added. A paragraph relocated to another section is reported twice, in two places, with no hint that it is the same paragraph.
- Line breaks are not meaning. Change a margin and every line in the paragraph rewraps; the words are untouched but the lines all differ. Comparing at line level is fast and readable, and this is what you pay for it.
- Extraction order is not always reading order. Multi-column layouts, sidebars and footnotes can come out interleaved, which produces differences that are artefacts of extraction rather than edits.
- Numbers hide in plain sight. 1,500 becoming 1,600 is one character. It will be in the diff, in a list of two hundred lines. Read the whole report.
A workflow that catches things
- If either file is a scan, OCR both before comparing.
- Run the text diff and read every reported change — do not skim to the ones that look important.
- Search the changed lines specifically for numbers, dates, names and negations (“shall” versus “shall not” is a two-character diff with total consequences).
- If the layout matters — a drawing, a chart, a stamped page — open both in a viewer and look at them too. The diff will not tell you a figure was swapped.
- Keep the report. It is the record of what you checked.
Why local matters here
Comparing documents means handling two versions of something confidential — usually a draft that has not been agreed yet. Both files are read in your tab and never transmitted, which means the pre-signature draft of your contract does not end up in a third party's processing pipeline. If you also need to remove content before circulating the result, do that with real redaction rather than a black rectangle.