red6 / pdfcompare

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

[QUESTION]: How to interpret the log of differences? #50

Closed ravijammi closed 5 years ago

ravijammi commented 5 years ago

This is a question not an issue. How do i interpret the log of differences which get generated? Consider the following log which gets generated: "Differences found at { page: 24, x1: 105, y1: 354, x2: 2137, y2: 2787 }" Reason i ask is, i tried to use PdfBox API and applied the same regions to retrieve the text from the actual pdf file, and i don't get the same content where the difference is?

finsterwalder commented 5 years ago

The "Differences found"-output is given in pixel coordinates, so I can be copy/pasted to an ignore.conf file. It has nothing to do with PdfBox Coordinates, since they use a different metric for coordinates. I don't remember of the top of my head, but PdfBox uses something like "DTP-Points" or similar.