v1.0.0 — Command-line tool Built with Go

pdfcomparer

Compare two PDF files page by page. Detect visual differences with configurable sensitivity, auto-alignment and parallel processing. Built for CI/CD pipelines.

Available for: Linux Windows macOS
$ pdfcomparer -a original.pdf -b revised.pdf -dpi 300 -t 0.02
Rendering original.pdf ... 12 pages
Rendering revised.pdf ... 12 pages
Comparing pages ...
Page 3 modified — diff 2.41%
Page 7 modified — diff 0.87%
Page 11 modified — diff 5.12%
────────────────────────────────────
3 / 12 pages differ.
Report saved → diff_report.pdf

Built with Go — modern techniques, maximum performance

Native concurrency

Goroutines and channels orchestrate rendering and comparison workers with no overhead.

Single binary

Zero runtime dependencies. One self-contained executable for Linux, macOS and Windows.

Low memory footprint

Go's garbage collector keeps memory usage minimal even when processing hundreds of pages.

Compiled speed

Native machine code. No JVM, no interpreter — starts in milliseconds and stays fast.

What pdfcomparer does

Precise, configurable and fast.

Pixel-level comparison

Renders each page at configurable DPI (150–300+) and compares images pixel by pixel using a color-distance threshold you control.

Auto-alignment

Detects and compensates global page shifts automatically. Configurable search offset and diff threshold to trigger alignment.

Parallel processing

Files A and B always render in parallel. Configure render workers per file (-rw) and comparison workers (-j) independently.

Visual diff report

Generates a PDF report highlighting every changed region. Output path configurable with -o.

Page range selection

Compare only the pages you need. Supports ranges like 1-10 or mixed lists like 1,3,7-12.

Multi-language

Report language auto-detected from the LANG env var. Supports English, Portuguese (pt-br) and Spanish.

Options reference

pdfcomparer -a FILE_A -b FILE_B [options]

Required
Flag Type Description
-astringFirst PDF file (original)
-bstringSecond PDF file (modified)
Output
Flag Type Description
-o string Output report PDF (default: diff_report.pdf)
-lang string Report language: en, pt-br, es (default: auto from LANG env)
Comparison sensitivity
Flag Type Description
-t float Color distance threshold 0.0–1.0 (default: 0.05)
0.01 = very subtle differences | 0.10 = only obvious differences
-min-diff-pct float Minimum diff% to consider a page different (default: 0.0)
Use 3.0 with -align=true to suppress anti-aliasing noise
-aa-blur int Box blur radius before comparing (0 = disabled)
1 = removes 1-px anti-aliasing | 2 = suppresses gradients up to 3 px
Rendering
Flag Type Description
-dpi int Render resolution (default: 150)
150 = fast, good for text | 300 = high quality, catches pixel-level image diffs
-pages string Page range, e.g. "1-10" or "1,3,7-12" (default: all)
-rw int Render workers per file; A and B always render in parallel (default: 2)
e.g. -rw 4 spawns 4 pdftoppm processes per file (8 total)
-j int Comparison workers (default: 4)
Auto-alignment
Flag Type Description
-align bool Auto-align: detect and compensate global shift when page diff is high (default: true)
-align-thr float Rough diff% above which alignment is attempted (default: 3.0)
-max-offset int Max pixel offset to search when aligning (default: 50)
License
Flag Type Description
-machine-id Print this machine's license ID and exit (send it to obtain a usage license)
-license string Path to the .lic file
Or set PDFCOMPARE_LICENSE, or place pdfcompare.lic next to the binary
-license-info Show the licensee information and exit

Examples

Basic comparison

$ pdfcomparer -a original.pdf -b revised.pdf

High quality, first 50 pages

$ pdfcomparer -a original.pdf -b revised.pdf -t 0.02 -dpi 300 -pages 1-50

Maximum parallelism

$ pdfcomparer -a original.pdf -b revised.pdf -rw 4 -j 8 -o report.pdf

Suppress anti-aliasing noise

$ pdfcomparer -a a.pdf -b b.pdf -align=true -min-diff-pct 3.0 -o report.pdf

Get machine ID for licensing

$ pdfcomparer -machine-id

Check license info

$ pdfcomparer -license pdfcompare.lic -license-info

Licensing plans

Per-machine license. All features included from day one.

6-month license

US$ 750
per 6 months
  • All CLI options and flags
  • Linux, Windows and macOS
  • Updates included during the period
  • License tied to a single machine
Get license
Save US$ 300

Annual license

US$ 1,200
per year
  • All CLI options and flags
  • Linux, Windows and macOS
  • Updates included during the period
  • License tied to a single machine
Get license

To purchase, run pdfcomparer -machine-id and send the ID to [email protected]