red6 / pdfcompare

A simple Java library to compare two PDF files
Apache License 2.0
220 stars 66 forks source link

Can we get the number of mismatch present while comparing 2 PDF files? #111

Closed dasabhd closed 3 years ago

dasabhd commented 3 years ago

It is more like a report kind of thing, where we can have a function that will return the number of mismatches present. It will be helpful for my project as the client will love to see a report, rather than just opening the compare files and go through them one by one.

finsterwalder commented 3 years ago

I'm not sure I fully understand, what you want. PdfCompare does not produce any kind of "report". You would have to do that yourself. You can get the found differences, when you call CompareResult.getDifferences(). And you would have to create a report yourself from that. BTW: With the config addEqualPagesToResult you can control, whether the resulting compare PDF only contains pages that differ or all pages from the original document.