Transform Documents $5.00 / 1,000 calls

PDF comparison

What this tool does

This tool compares two PDF files page by page and tells you whether they look the same. It renders both documents, measures the visual difference and returns a similarity score plus images highlighting what changed.

When to use it

  • Checking that a generated PDF did not change after a template or data update.
  • Reviewing a contract received from a supplier against your copy.
  • Validating that a converter produced an identical-looking document.
  • Spotting unexpected changes in recurring reports.

What to expect

You get identical, the average similarity between 0 and 1, the list of changed pages and a ZIP with a diff image per changed page (changes highlighted in red). When nothing changed, no file is produced and result is empty.

Limitations

  • The comparison is visual: a different font or a re-saved file can show as a change.
  • Only the pages present in both files are compared; a different page count always counts as a difference.
  • Up to 200 pages per file.

When it fails

  • One of the URLs is not a valid PDF.
  • A file cannot be downloaded.
  • The page or option limits are exceeded.

Good to know

  • Raise threshold to ignore JPEG noise and small anti-aliasing differences.
  • dpi 100 is enough for layout review; raise it to 200 for small print.

Input data

Parameter Required Example Description
url Yes https://public.downloads.uproc.io/samples/sample.pdf Public URL of the original PDF.
url_b Yes https://public.downloads.uproc.io/samples/sample.pdf Public URL of the PDF to compare against.
dpi No 100 Rendering resolution for the comparison, between 72 and 200. Default 100.
threshold No 25 Pixel difference tolerated (0-255). Default 25 ignores JPEG noise.

Output data

Field Description
result Signed URL of a ZIP with one diff image per changed page (empty when identical).
identical True when both files look the same and have the same page count.
similarity Average page similarity between 0 and 1.
pages_a Pages in the first PDF.
pages Pages actually compared.
pages_b Pages in the second PDF.
changed_pages 1-based numbers of the pages with visual changes.
changed_count How many pages changed.