Docento.app Logo
Docento.app
All Posts

How to Compare Two PDF Documents Side by Side

March 8, 2026·4 min read

Comparing two versions of a contract, two drafts of a paper, or this month's report against last month's — this is one of the most useful PDF skills nobody teaches. Most people still do it by tabbing back and forth between two windows. There are much better ways.

What you actually want from a PDF comparison

"Compare" means different things depending on the document:

  • Text comparison: which words changed, were added, or were removed?
  • Layout comparison: which paragraphs moved? Did formatting change?
  • Visual comparison: did anything in the image, chart, or signature differ — even if the text is identical?
  • Metadata comparison: who edited it, when, and was the security setting changed?

Different tools answer different questions. Picking the wrong one costs you time.

Method 1: A diff-style PDF comparison tool

Dedicated PDF comparison tools highlight added text in green, deleted text in red, and modified blocks in another colour, all aligned page-by-page. This is the right answer for contracts, policies, and academic papers where word-level changes matter.

Things to set up:

  • Match by page vs match by content. Match-by-content handles cases where pages were inserted in one version and the rest shifted; match-by-page assumes the same page numbers contain the same content.
  • Ignore whitespace and case when comparing drafts where formatting changed but words didn't.
  • Output mode: a side-by-side report PDF you can email, vs a summary list of differences.

Method 2: Convert to text, then diff

For pure-text comparisons (no images, no layout concerns), the simplest workflow is to extract text from both PDFs and run a regular text diff:

  • Convert each PDF to plain text. See how to convert a PDF to text.
  • Use any diff tool: VS Code's compare view, the diff command, or a web-based diff checker.

This loses formatting but catches every word-level change. It is also fast, scriptable, and free. Note that PDFs sometimes extract text in non-obvious orders (multi-column layouts, footnotes mixed in with body text), so confirm the extraction is sensible before trusting the diff.

Method 3: Visual / pixel-level comparison

For documents where layout matters as much as text — design proofs, annual reports, marketing PDFs — pixel comparison shows you anything that changed visually, even if the underlying text is identical.

  • Convert each page of both PDFs to PNG.
  • Use ImageMagick: magick compare -metric AE old.png new.png diff.png — produces an image with differences highlighted.
  • Or open both PNGs as layers in any image editor and toggle visibility.

This catches things text comparison misses: a logo replaced with a similar-but-different one, a signature swapped, a chart with different values.

Method 4: Browser-based comparison

A browser tool that handles comparison in-page is the right choice when documents are confidential. Docento.app keeps both files on your device and runs the comparison locally — useful for legal review where the PDFs cannot be uploaded.

Practical workflow for contracts

Lawyers and procurement teams compare PDFs more than anyone. A workflow that holds up under stress:

  • Always compare against the last signed version, not the last draft you have lying around. Pull the signed copy from your DMS.
  • Run text-level comparison first to catch wording changes.
  • Run visual comparison second to catch formatting shifts that change meaning (a comma moved, a number's font changed).
  • Save the comparison output as a PDF and store it next to the new version, so future readers can see what changed.
  • Re-sign the new version. See how to sign a PDF online.

Common pitfalls

  • Comparing scanned vs digital versions. The text layers differ even when the content is identical, because OCR introduces minor variations. Convert both to a normalised form first, or compare visually.
  • Comparing two exports of the same source. If both PDFs were exported from Word at different times, the same content may have shifted by a few pixels, drowning real changes in noise. Use text comparison, not visual.
  • Trusting "no differences" output. Tools occasionally miss differences in form fields, layered objects, or annotations. Always spot-check a few pages by eye.
  • Forgetting metadata. Two PDFs can have identical content but different authors, modification dates, or stripped metadata. For audit trails, compare metadata too.

Conclusion

Match the tool to the question. Word-level changes call for diff-style comparison. Layout changes call for visual comparison. Big batches call for scripted text extraction and diff. Docento.app handles the most common case — side-by-side comparison without uploading — directly in your browser. For every comparison workflow, save the diff output: it becomes the audit trail when someone asks "what changed?"

Related Posts