Use comparepdfcmd to compare two PDF files using the command line. In a
console (i.e., in a Command Prompt window opened by running
cmd.exe) enter, e.g.,
comparepdfcmd.exe -r report.pdf
old.pdf new.pdf. If there are any differences
report.pdf will be output with each pair of pages from
new.pdf shown side-by-side with
differences color highlighted (as with a highlighter pen).
This commercial console (command line) program for Windows is ideal for testing, quality assurance, scripted comparisons, and regression testing. It is fast and cloud-free: comparepdfcmd runs on your own computer without the size or page limits of online tools—some customers compare PDFs with thousands of pages. Customers include publishers, banks, insurers, and Governments. (See also Why Compare PDFs?)
comparepdfcmd can say whether two PDFs—or two folders of PDFs—are the same or different, and it can optionally output one or more reports that show any differences. The reports can be output in PDF format, or as PNG images, or in CSV format suitable for spreadsheets or regression testing, or JSON or XML format.
Comparisons can be made based purely on the text regardless of margins and word-wrap, or based on appearance (which accounts for fonts, colors, layout, diagrams, images, etc.)
If you require an easy-to-use graphical user interface (GUI) tool, use DiffPDF.
"Your software is the best I've ever used for comparing PDFs.", —customer feedback.
Legal copies of our software are only available from www.qtrac.eu, www.qtrac.uk, www.diffpdf.com, and diffpdf.appspot.com, and can only be bought via MyCommerce/ShareIT.
You can try comparepdfcmd free for up to 20 days using a trial license key. And you can buy a full license key for comparepdfcmd that has no time limit for $180 USD plus local sales tax (or local equivalent for many major currencies) using the secure MyCommerce platform. Tiered price discounts are applied if you buy at least 5 license keys—these are shown when you click Buy Now. (Purchasing departments: comparepdfcmd's Product ID is 300913524.)
comparepdfcmd is a 64-bit application that will work on 64-bit Windows 7, Windows 8, and Windows 10, on computers that have x86-compatible processors, i.e., almost all desktop and laptop computers. (If you require a 32-bit application, use diffpdfc.)
To get a free trial:
cmd.exe), change directory into comparepdfcmd's folder and run:
comparepdfcmd.exe tryThis will acquire a free trial license key over the internet and then register it. The program will then be ready to use.
You will probably find it convenient to add comparepdfcmd to your
PATH. How to do this is explained in the manual, along with
full details of all comparepdfcmd's features. The manual is
included in the package and can also be viewed online:
comparepdfcmd2.pdf (~229 KB).
If you want to buy one or more licenses, visit
Now or run
comparepdfcmd.exe buy. Once you've completed
your purchase the confirmation page will show an Order ID. The
Order ID and a “get key” link will be emailed to you. You can then
use the Order ID or the link to acquire as many license keys as
you purchased on each computer you want to use. Once you have bought a
comparepdfcmd.exe getkey order-id to acquire
the key, and then
comparepdfcmd.exe register key to
We recommend trying before buying, since license key purchases can't be refunded.
Note that each free trial and full license key is tied to the particular computer it is acquired on. Each such license key is valid for all minor and patch versions (e.g., if acquired for version 2, it is valid for all 2.x.y versions). There is no time limit for full license keys—providing the firmware and hardware (and how Windows reports it)—don't change. Annual keys are valid for all minor and patch versions (from 2.1.0), and have a one year time limit. They are not tied to any particular computer. Annual keys are only available in selected countries to selected customers, and have a minimum order, so the minimum purchase is at least $1,800 USD; their Product ID is 300917580.
All license types are governed by the comparepdfcmd-license.pdf (28 KB).
If you want to automate lots of PDF comparisons you might find it
helpful to output reports in
.xml format and to use our free retest console (command line) program for Windows
and Unix. Retest makes it simple to automate black box regression
Here is one example use of the program:
C:\Users\me>comparepdfcmd -v -s ^ -r report.pdf ^ oldfile.pdf newfile.pdf Wrote "report.pdf"
Here the two PDFs have some different text (compared word-by-word which
is the default), and because of the
option, the differences are shown highlighted in the file
report.pdf. In addition, due to the
--show option, the
report.pdf differences report will
be shown in your PDF reader. The message was output because the
--verbose option was used. If they had the same
texts the output on the console would have been
report would have been produced, and no report would be shown in your
^ is the Windows line continuation character; you
don't need it/them if you write the whole command as a single line.
Here is another example use of the program:
C:\Users\me>comparepdfcmd -f pdf ^ -R reportdir -S summary.csv ^ oldpdfdir newpdfdir
This run compares each PDF file in the
with a PDF file in the
newpdfdir directory that has the same
name (if there is one). For each pair of PDFs that differ, it produces
the requested report in the
reportdir with the same name as the
original files, and with the differences highlighted. In addition it
produces a summary of the differences in the file
Here is an example use with a custom configuration file:
C:\Users\me>comparepdfcmd -C myconfig.ini ^ -r diff.csv file1.pdf file2.pdf
This run reads the configuration from
myconfig.ini and outputs
a CSV difference report if
file1.pdf is different from
file2.pdf. The configuration file need only contain those
options which you want to set to non-default values. Every configuration
file option is explained in the manual.
For a summary of all the command line options run either of these commands:
C:\Users\me>comparepdfcmd -h C:\Users\me>comparepdfcmd --help
All the command line options and configuration file options are listed and explained in the manual: comparepdfcmd2.pdf (~218 KB). This can also be viewed using the program using either of these commands:
C:\Users\me>comparepdfcmd -m C:\Users\me>comparepdfcmd --manual
Here is an extract of a screenshot of a PDF report:
Red change bars in the left margin indicate where changes are, and changes are highlighted by coloring them as if with a highlighter pen.
We always recommend using the most recent release. (For details of the changes between versions, see the Changes page.)
Your Privacy • Copyright © 2006 Qtrac Ltd. All Rights Reserved.