A PDL file comparison tool, support comparison of PDF, Postscript and AFP documents. xdiff.ncc not only compares rendering bitmap of each page, but also analyzes and compares all contents in each page. For detail, see showcase below.
https://lumpchen.github.io/xdiff.ncc/
Testcase | Control | Test | Report |
---|---|---|---|
simple text | control.pdf | test.pdf | report.html |
simple image | control.pdf | test.pdf | report.html |
table | control.pdf | test.pdf | report.html |
form control | control.pdf | test.pdf | report.html |
Indesign forms | control.pdf | test.pdf | report.html |
misc | control.pdf | test.pdf | report.html |
You need Java JDK 7 (or higher) and Maven 3 http://maven.apache.org/ to build xdiff.ncc. The recommended build command is:
mvn clean install
The default build will compile the Java sources and package the binary classes into jar packages. See the Maven documentation for all the other available build options.
xdiff.jar, download both xdiff.jar and config.properties. xdiff.jar is an excutable java program, see detail in usage section.
Usage: java -jar xdiff.jar [options] <baseline-pdf> <test-pdf> <result-folder>
Options:
-config : Comparison configuration file path.
Example: java -jar xdiff.jar c:/config.properties c:/xdiff/control.pdf c:/xdiff/test.pdf c:/xdiff/report
For Postscript file comparion, xdiff.ncc need GhostScript installed in advance, xdiff.ncc will use it as a Postscript to PDF convertor. Set GS_Path in config.properties:
GS_Path = C:/Program Files/gs/gs9.18/bin/gswin64c.exe
xdiff.ncc uses PDFBox for PDF interpreting and rendering. PDFBox is a project of the Apache Software Foundation http://www.apache.org/. xdiff.ncc is based on PDFBox 2.0.7.
Generate PDF format report
Continuous comparison accross pages
header/footer setting
Automatically identify paragraphs and tables
http://www.apache.org/licenses/LICENSE-2.0
xdiff.ncc 可用于PDL类型的文档比较,支持PDF,AFP,PostScript(需安装GhostScript)。