1DiffPDF 2=========== 3 4DiffPDF is used to compare two PDF files. 5 6By default the comparison is of the words on each pair of pages, but 7comparing character by character is also supported (e.g., for 8logographic languages). And there's also support for comparing the pages 9by appearance (for example, if a diagram is changed or if a paragraph is 10reformatted, or a font changed). It is also possible to compare 11particular pages or page ranges. For example, if there are two versions 12of a PDF file, one with pages 1-12 and the other with pages 1-13 because 13of an extra page having been added as page 4, they can be compared by 14specifying two page ranges, 1-12 for the first and 1-3, 5-13 for the 15second. This will make DiffPDF compare pages in the pairs (1, 1), (2, 162), (3, 3), (4, 5), (5, 6), and so on, to (12, 13). 17 18A couple of example PDF files are provided online so that you can try it 19out. PDF files can be loaded from the GUI (by pressing the File #1 and 20File #2 buttons), or by specifying them on the command line. More 21information is available in the program's tooltips and About box. 22 23(If you want a command line tool for comparing PDFs see 24http://www.qtrac.eu/comparepdf.html.) 25 26Home page: http://www.qtrac.eu/diffpdf.html 27 28Windows Users 29============= 30 31Download the zip file, e.g., diffpdf-1.9.2.zip (where the number will 32vary depending on the version). Navigate to the file in Windows Explorer 33and use the context menu to choose the Extract All option. It doesn't 34matter what folder you extract to, but best to use one specifically for 35DiffPDF. The folder will contain diffpdf.exe and may contain some .dll 36files too. If there are .dll files, you must not move diffpdf.exe to any 37other folder! 38 39Once unzipped you can double-click diffpdf.exe to run it. You might also 40like to add a shortcut to it from the desktop or from the start menu. 41 42Compiling and Installing DiffPDF (Mac-specific notes are at the end.) 43================================ 44 45Prerequisites: A C++ compiler, the Qt 4 libraries (I test with Qt 4.7 46and Qt 4.8. Earlier Qt's may work although Qt 4.4 and 4.5 will at least 47need a compiler with tr1 support), and the Poppler libraries (at least 480.20.1, including Poppler's Qt 4 headers). Linux and BSD users should be 49able to get everything through their package management system---and 50some distros already include diffpdf so you don't even have to build it. 51Mac OS X users can get a compiler by installing Xcode; you'll need to 52get Qt and Poppler separately. 53 541. Unpack the archive file, diffpdf-XXX.tar.gz 55 $ tar xvfz diffpdf-XXX.tar.gz 562. Change directory to diffpdf-XXX 57 $ cd diffpdf-XXX 583. Run lrelease; on some sytems this might be called lrelease-qt4 59 $ lrelease diffpdf.pro 604. Run qmake; on some systems, run qmake-qt4 61 $ qmake 625. Run make 63 $ make 646. Copy or soft-link the diffpdf executable to somewhere on your PATH 657. Only the executable is needed; all the files that were unpacked or 66 generated can be safely deleted. 67 68That's it! 69 70 71Running DiffPDF 72=============== 73 74A pair of tiny example files are available: 75http://www.qtrac.eu/boson1.pdf and http://www.qtrac.eu/boson2.pdf. You 76can use these to see the difference between text and appearance 77comparisons and to get a feel for how DiffPDF works. 78 79If you hit a bug, please report it to mark@qtrac.eu. Be sure to include 80"DiffPDF" in the subject line and specify the version you are using 81and details of your system, e.g., operating system name and version, 82compiler name and version, Qt library version, Poppler library version. 83 84 85License 86======= 87 88This program was written by Mark Summerfield. 89Copyright © 2008-13 Qtrac Ltd. All rights reserved. 90 91This program is free software: you can redistribute it and/or modify it 92under the terms of the GNU General Public License as published by the 93Free Software Foundation, either version 2 of the License, or (at your 94option), any later version. This program is distributed in the hope that 95it will be useful, but WITHOUT ANY WARRANTY; without even the implied 96warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 97GNU General Public License (in file gpl-2.0.txt) for more details. 98 99 100Building on Mac OS X 101==================== 102 103Here's how to build it: 104 105$ /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)" 106$ brew install qt 107$ brew install poppler --with-qt4 108 109# Dirs must be writeable because macdeployqt modifies copied files 110$ chmod -R u+w /usr/local/Cellar/qt/ 111$ chmod -R u+w /usr/local/Cellar/poppler/ 112 113$ curl -O http://www.qtrac.eu/diffpdf-1.5.0.tar.gz 114$ tar xvfz diffpdf-1.5.0.tar.gz 115$ cd diffpdf-1.5.0 116$ lrelease diffpdf.pro 117$ qmake -spec macx-g++ 118$ make 119 120Here's how to make a .dmg: 121 122# Fix references, remove unneeded Frameworks and build DMG 123$ macdeployqt diffpdf.app/ 124$ cd diffpdf.app/Contents/Frameworks/ 125$ rm -r QtDeclarative.framework/ QtNetwork.framework/ 126QtScript.framework/ QtSql.framework/ QtSvg.framework/ 127QtXmlPatterns.framework/ 128$ cd ../../.. 129$ hdiutil create diffpdf-1.5.0.dmg -srcfolder diffpdf.app/ 130 131Thanks to Dirk Loss for this information. 132