How to compare the differences between two PDF files on Windows?

Do you know a good way to compare PDF files side-by-side and show the modifications between the two? I'm looking for Windows software to accomplish this. It would be great if you can post both free and not-free products.

community wiki Commented Sep 10, 2012 at 9:28 There is a FREE library to compare pdf pixel by pixel. Check this blog: testautomationguru.com/… Commented Jun 16, 2015 at 23:35

free. run in browser so works on all OSes. click the select text icon top right, the open primary doc in left pane and secondary doc in right page. then click the play button top left to start comparison. then scroll from page to page to see differences. demo.leadtools.com/JavaScript/DocumentComparison/index.html

Commented Nov 11, 2020 at 21:37

19 Answers 19

Try WinMerge with the xdocdiff plugin. Both are completely free. No strings attached.

A couple of the comments below suggest they don't see any difference. That means the plug-in isn't installed correctly. Here's how:

  1. Put the files where the xdocdiff plugin's readme file says to put them (there are two places; I won't list them here as filenames can change, etc. — read the readme)
  2. In WinMerge, go to Plugins > List and tick the "Enable Plugins" checkbox (this step is missing from the xdocdiff readme)
  3. In WinMerge, choose Plugins > Automatic Unpacking (this was disabled prior to step 2)

Then when comparing, you'll see what look like text files in the comparison windows.

community wiki

Tried this but couldn't see any difference when not using the xdocdiff plugin. Is there an option to select in WinMerge's UI?

Commented Sep 18, 2012 at 9:53

What is the purpose of viewing the binary text in a PDF? I expected to see the visual differences as done by i-net PDFC.

Commented Jan 4, 2013 at 11:03 Was there any way to make this handle column breaks? Without it one change cascades into several. Commented Apr 29, 2013 at 23:48 Plugins > List and tick the "Enable Plugins" checkbox was what was missing for me! Commented May 5, 2014 at 11:28 Many characters are missing from the text versions of the PDFs shown in the WinMerge diff windows Commented Jun 25, 2018 at 9:40

On Linux and Windows you can use diffpdf (which differs from diff-pdf mentioned in this thread).

enter image description here

On Ubuntu install using:

sudo apt-get install diffpdf 

For Windows, this Diffpdf Windows version works really great. You can download from http://soft.rubypdf.com/software/diffpdf (scroll down to Win32 static version).

community wiki

Proper name is DiffPDF (as seen in the screenshot) and it's based on Qt 4 and Poppler library, thus it is portable. See DiffPDF homepage: qtrac.eu/diffpdf.html. Information about Windows build is here: soft.rubypdf.com/software/diffpdf. And your installation instruction works on Debian too.

Commented May 22, 2011 at 17:59

The DiffPDF home page now has links for Linux, Windows installer, and Mac DMG installs as well (qtrac.eu/diffpdf.html).

Commented Oct 25, 2012 at 19:37

DiffPDF is the most advanced tool presented here, in my opinion. Not only does it offer a nice graphical comparison, but it tracks changes more cleverly than others, e.g. the xdocdiff for WinMerge. However, it has one serious problem: It limits the comparison to pages. That means, if you have some text on page 2 of document A, but this text moves to page 3 in document B, then the tool thinks its gone in A and added in B.

Commented Mar 29, 2014 at 1:31 The older free versions can be found here Commented Jun 4, 2014 at 12:29

I tried using this for a novel that I export to PDF. Unfortunately the tool lost track after around 10 pages and considered everything to be "different", even though large passages were exactly the same.

Commented Mar 2, 2016 at 19:50

I recently found this and I love it.

Cross platform, free, and works well.

Here is a screenshot of diff-pdf in action - note that the text is not different in the PDF, but only fonts (and correspondingly, layout settings):

diff-pdf.png

The call to obtain that image was:

diff-pdf --view testA.pdf testB.pdf 

. where testA.pdf/testB.pdf are obtained by compiling this simple Latex file with pdflatex (accordingly for each pdf, see comment):

\documentclass[12pt] % without mathpazo: testA.pdf \usepackage % with mathpazo: testB.pdf \usepackage \title \author \begin \maketitle \lipsum[1-3] \end
community wiki

Just one more note about diff-pdf : DiffPDF is great for quick visual side-by-side comparison of changed text, but it is practically impossible to debug stuff like, say, small changes in line spacing - diff-pdf on the other hand, basically puts the page contents from both compared files on the same page (but with different color) - so line spacing problems can be easily identified. Cheers!

Commented Oct 6, 2011 at 10:20

This is great! Is there anyway to track progress on large files when outputting to a PDF file (not using the --view option)? The verbose option /v does not seem to do anything. Also when you run the command to generate a compare PDF it runs in a separate process so it does not pause the command prompt like normally happens when you execute something from the prompt.

Commented Nov 28, 2016 at 19:10

This is the one I needed. I'm comparing PDF reports about numeric executions, so I'm looking for differences in one digit in a whole page. Problem is, I can not identify the cyan characters, but knowing where the difference is, is enough to find it in the original reports.

Commented May 4, 2017 at 9:44

Note that diff-pdf is great for comparing spatially-sensitive images like technical drawings. It highlights the changed pixels of blueprints or schematics or graphs that have identical scaling, such as revisions of the same design.

Commented Oct 27, 2021 at 20:18

We also needed to compare PDFs at our company and were not satisfied with any of the solutions we found, so we made our own: i-net PDFC. It's not free, but we do offer a 30-day trial.

It's written in Java, so it's cross-platform.

screenshot

What makes it special is that it compares the content as opposed to only the text (or just converting the pdf to an image and comparing the image). It also has a nice visual comparison tool.

community wiki Nice bit of software. Commented Sep 18, 2012 at 9:53

I couldn't get this to work. Loaded the two files and clicked on the compare button and nothing happens.

Commented Jun 10, 2016 at 17:57

Correctly handles cross page differences. Has an export/print functionality. Different comparison profiles (including custom). Mouse over gives you more details on what changed. Looks great. Drawbacks are the trial/cost and doesn't handle moves. Definitely superior to the tools higher voted IMO.

Commented Nov 21, 2017 at 20:19

@JonathanGawrych thanks for the kind words! What do you mean by "moves", exactly? Maybe we could add that functionality.

Commented Dec 5, 2017 at 9:24 yowsers this is $200 a year software! Commented Sep 11, 2018 at 22:50

I wanted to do this (diff PDFs) recently with these requirements:

I installed pdftotext, wdiff, and colordiff, available in various package managers. (With macports: sudo port install poppler wdiff colordiff )

Now I can see which words, nicely colored, have changed.

Using dwdiff can produce slightly better results.

I also wanted HTML output so this tiny script makes a basic web page with a bit of CSS.

bash pc-script.bash old.pdf new.pdf > q.htlm

Then open q.html with your web browser.

#!/bin/bash OLD="$1" NEW="$2" cat Changes from $OLD to $NEW .plus < color: green; background: #E7E7E7; >.minus 

Changes from [ $OLD ] to [ $NEW ]

EOF dwdiff -i -A best -P \ --start-delete='' --stop-delete='' \ --start-insert='' --stop-insert='' \ <( pdftotext -enc UTF-8 -layout "$OLD" - ) \ <( pdftotext -enc UTF-8 -layout "$NEW" - ) \ cat <  EOF 

An example of output can be seen here

enter image description here

community wiki @philcolbourn Google+ is being shut down, maybe share the screenshot via imgur? Commented Mar 25, 2019 at 21:56 fwiw, I've stumbled upon this tiny repo: github.com/tpltnt/cli-diffpdf/blob/master/cli-diffpdf.sh Commented Mar 26, 2019 at 8:17

If you're using Windows, Mac, Fedora, openSUSE or you're capable of compiling the binaries from source for your system, diff-pdf is a better solution that accomplishes this without needing to install three different dependencies. Not to be confused with diffpdf mentioned in another answer, which functions via GUI only.

Commented Jun 20, 2019 at 21:58 Note that the pc-script.bash script does not escape characters for HTML. Commented Aug 14, 2019 at 15:18

It would be great if the script could strip the html of what is not text. In my case I get a lot of random circles where there are figures.

Commented Jun 8, 2020 at 17:40

You can also use Adobe Acrobat X. Its has built in PDF comparison functionality under "View -> Compare Documents.

community wiki Acrobat or Acrobat Reader? the Reader software doesn't have this Commented Nov 28, 2012 at 17:06 AcrobatX Pro is the only version which has this feature. The "just plain AcrobatX" does not. Commented Feb 20, 2013 at 21:16 In Acrobat 9 Pro it's under the Document menu. Commented Jun 28, 2013 at 13:15 Commented Mar 2, 2015 at 16:39

I tried Adobe Acrobat DC (not free) and it did a better job comparing a 50-page document of the rules of my son's daycare (the diffs were not not perfect, but it's a hard) than Winmerge (which got really confused by new footers) or diffpdf (which seems to do it page-by-page and that's a pretty big disadvantage). I dislike Adobe for lots of reasons, but in this case it was the best.

Commented Aug 17, 2020 at 17:12

If you are comparing text inside a pdf, then Beyond Compare does this.

Not free, but there is a thirty day trial.

community wiki Yep, New > Text Compare helped me see basic differences in the text between 2 PDF files. Commented May 22, 2018 at 17:23

Great tool and easy to use : Compare-It v4 (from http://www.grigsoft.com/)

Compares many different kind of files. It has some built-in converters, including one for PDF files.

I've used it quite a few times with satisfying results.

Really should try this. Trial version allows comparison for unlimited time.

community wiki This was the best and easiest of all for me. Thanks! Commented Apr 18, 2012 at 7:41 Easiest and most simple tool I found to use. I wish I could upvote this more than once! Commented Jul 13, 2015 at 2:48

For PDF the comparison seem to be textual. Last release in 2010. You can pay for it but sure what difference is - I did't see any limitations ?

Commented Nov 20, 2015 at 13:47

Don't know it, but there is also comparePDF (not free, but a 30 day trial possible): http://www.compare-pdf.com/download.htm

community wiki

My proposal for best tool to compare PDFs is Kiwi PDF Comparer.

Unlike most, you can compare both text and images in the document and you also have another option to compare pages pixel-to-pixel. When comparing text it has more resolution tan everyone else because it highlights changed characters and not whole words.

It must also be the only software to do a PDF diff in which you do not have to go looking for the marked differences because you can go from one difference to another just one click.

There is a free version that works very well, but the paid version is also the cheapest one with a difference between professional applications. Being written in Java can be run on Windows, Linux and Mac OS.