Skip to content

๐Ÿ” Compare PDFs for equality and show differences

License

Notifications You must be signed in to change notification settings

simplytest/pdfcomp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

17 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

PDFComp


๐Ÿ‘‹ Introduction

PDFComp is a tool to compare two given PDFs (or images) for equality. Equality is determined by the absolute pixel difference.

๐Ÿ–ฅ๏ธ Usage

Usage: pdfcomp [OPTION]... <first> <second> 

A utility to compare PDF and image files

OPTIONS

  -t, --tol[=<value>]         Absolute tolerance
  -d, --density[=<value>]     Density to read image in
  -o, --output[=<path>]       Folder to save a difference image(s) to
  -f, --fuzz[=<value>]        Fuzziness to use for comparison
  -p, --prefix[=<value>]      Filename prefix to use
  -m, --method[=<value>]      Highlighting algorithm to use (0 = simple, 1 = difference, 2 = double compare)
      --help                  show help
      --version               show version

If the given PDFs are equal the return code is 0, in case they aren't it is 2.

๐Ÿงฐ Compilation

Make sure you have all required dependencies:

  • ImageMagick
  • C++23 Compiler

Then clone the project and compile:

git clone https://github.com/simplytest/pdfcomp
cd pdfcomp

cmake -B build && cmake --build build