This is a small bash script to visually compare two PDF files. It can be used with
cmppdf path/to/file1.pdf path/to/file2.pdf
This script requires:
- basic PDF tools such as
pdftotext
andpdftoppm
apt-get install poppler-utils
on Linux orbrew install poppler
on MacOS
pdftk
apt-get install pdftk
on Linux orbrew install pdftk-java
on MacOS
- ImageMagick
apt-get install imagemagick
on Linux orbrew install imagemagick
on MacOS)
- Core GNU utils such as
b2sum
, which are included in most Linux distribution but may require to be installed on MacOS usingbrew install coreutils
This software is distributed under the CC BY-SA 4.0 license (Attribution-ShareAlike 4.0 International). The graphical compare code was originally posted by linguisticturn
on StackOverflow (License CC BY-SA 4.0) and later improved by Jim Avera in the same thread, who posted it on his personal website. I (Emmanuel Dervieux) only posted it on GitHub for the sake of continuation, bug tracking, and possible further improvements if need be.