Guides / PDF

Compare PDFs

POST /v1/pdf/compare  ·  1¢ / page

Visually compare two PDFs page by page: change percentage per page as JSON, or a diff PDF with changes highlighted in red. Billed per page.

Parameters

NameTypeDescription
filefile · requiredTwo PDF files (field name "file", twice).
dpiinteger · optionalRaster resolution 50–200, default 100.
thresholdinteger · optionalPer-channel tolerance 0–64, default 12.
outputstring · optionaljson (default) or pdf (diff overlay).

Example request

curl -X POST https://api.bigapi.dev/v1/pdf/compare -H 'Authorization: Bearer $KEY' -F 'file=@v1.pdf' -F 'file=@v2.pdf'

Example response

{
  "pages_compared": 12, "pages_changed": 2, "identical": false,
  "per_page": [ { "page": 3, "changed_percent": 4.31, "identical": false } ],
  "_meta": { "op": "pdf.compare", "durationMs": 890.5 }
}

Related guides