comparepdf is a command line tool for comparing two PDF files. By default it compares their texts but it can also compare them visually (e.g., to detect changes in diagrams, images, fonts, and layout). It should prove useful for automated testing.
If you want a GUI application that shows the detailed differences between PDFs use DiffPDF instead.
comparepdf is licensed under the GNU General Public License v 2 open source license. To build it you will need a modern C++ compiler, the Qt 4 libraries (at least Qt 4.4; 4.6 or later recommended), and the Poppler library—all these should be available as standard packages on most Linux and BSD systems. For Mac OS X you’ll need to install Xcode for the compiler and then get Qt and Poppler separately. The source is comparepdf-1.0.0.tar.gz (15K). Building follows the standard pattern for Qt 4 applications and is explained in the README.
comparepdf [options] <pdf1> <pdf2>
A program to compare two PDF files.
-c –compare=STRING (a, appearance, t, text; default text)comparison mode
-h –help show this information and terminate
-v –verbose=INTEGER (0, 1, 2; default 1) 0 = quiet; 1 = report
differences; 2 = report same and different
A return value of 0 means no differences detected; 1 or 2 signifies an
error; 10 means they differ visually, 13 means they differ textually,
and 15 means they have different page counts.
- Product Options
# Option Price 1 donation $10.00
- Shipping Rate: F