Free plan
Compare PDFs
Compare two PDFs and see what changed between them
About this tool
This tool compares two versions of a PDF and shows the differences. It can compare the text line by line, show a picture of what changed on each page, or give one line per page that says whether it is the same or changed. You can limit the check to some pages or to an area of the page.
For example, you see what was edited between the first and the final version of a contract.
How to use it
- Choose this tool.
- Add the first PDF in the first slot and the second PDF in the second slot.
- Choose how to compare: text, picture or page by page.
- Optionally choose which pages to compare.
- Press Generate and read the differences.
What you get back
You get a report of what is different, and for the picture mode a picture of the changes on each page.
GOOD TO KNOW
Visual comparison supports at most 200 pages per document.
TEST IT LIVE
Try Compare PDFs in the Studio
One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Family
PDFs
Plan
Free
Method
POST
Endpoint
/v1/pdfs/compare
Tool ID
pdfs.compare
Authentication
API key
Accepts
PDF
Background jobs
Yes
Usage group
Pdf
For developers
Use it from your code
cURL
curl -X POST "https://app.h2i.davixlabs.io/v1/pdfs/compare" \
-H "X-Api-Key: $DAVIX_H2I_API_KEY" \
-F 'fileA=@document.pdf' \
-F 'fileB=@document.pdf' \
-F 'mode=text' \
-F 'dpi=100' \
-F 'threshold=0.1'Node.js
const { DavixH2I } = require('@davixlabs/h2i-sdk');
const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.pdfs.compare({
"fileA": 'document.pdf',
"fileB": 'document.pdf',
"mode": "text",
"dpi": 100,
"threshold": 0.1
});
console.log(result.data, result.requestId);PHP
<?php
require 'vendor/autoload.php';
$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->pdfs()->compare([
'fileA' => 'document.pdf',
'fileB' => 'document.pdf',
'mode' => 'text',
'dpi' => 100,
'threshold' => 0.1,
]);
echo $result->requestId;Documentation
Guides that use this tool
More in PDFs
