Compares two PDF files visually, returning a status code or producing a highlighted diff PDF or interactive viewer.
Overview
diff-pdf compares two PDF documents and reports whether they differ. By default it only sets the exit code: zero when pages match and one when they do not. With an output option it can write a new PDF that marks visual differences between the inputs.
A view mode opens a simple graphical window to flip through pages, zoom, and align pages with keyboard shortcuts. That helps spot translation-only shifts versus content changes. Additional flags are listed in the built-in help output.
Prebuilt archives exist for Windows, and package managers such as Homebrew, MacPorts, Chocolatey, Fedora, CentOS, and openSUSE can install binaries on common desktop systems. Sources build with Autotools on Unix-like systems and via MSYS on Windows, linking wxWidgets, Cairo, and Poppler.
Upstream maintenance is limited: the author accepts pull requests but does not promise support or feature work, so users who will not build or patch code themselves are warned the tool may be a poor fit.
Key features
- Exit-code comparison of two PDFs
- Highlighted difference PDF output
- Interactive GUI viewer mode
- Page shift alignment shortcuts
- Prebuilt Windows ZIP releases
- Homebrew and MacPorts packages
- Fedora and openSUSE packages
- wxWidgets, Cairo, and Poppler rendering
Use cases
- Regression-test exported PDF layouts
- Spot visual drift between document revisions
- Produce marked diff PDFs for review
- Check translation-only page offsets
- Automate PDF equality in shell scripts