red6 / pdfcompare

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

I'm compare two same files but got [Diff-3-thread-1] INFO de.redsix.pdfcompare.DiffImage - Differences found at { page: 1, x1: 424, y1: 863, x2: 2356, y2: 1817 } #21

Closed Alexandr-Kaliuk closed 6 years ago

Alexandr-Kaliuk commented 6 years ago

Hi, I'm try two compare downloaded file with goldenCopy (they are the same), but on finish I am got message that "differences found". Assumption: When I'm compare files locally - all is fine. Problems starts when I'm get goldenCopy from gitHub and compare it with same file downloaded from browser. image

Maybe You know how I can get around this problem? Thank You!

finsterwalder commented 6 years ago

Hi Alexandr,

I'm not sure I understand your problem. I don't quite understand what you mean with "goldenCopy". The image you posted looks very different to me, so I would expect a diff. The font is different. PdfCompare renders each Page of your Pdf as an image and compares them pixel by pixel. If you really habe identical Pdfs, I don't see how that gives a diff. If your Pdfs are somehow different (use different fonts but show the same content), that gives a diff, of course. PdfCompare does not read the text and compares that.

Alexandr-Kaliuk commented 6 years ago

I understand. Ok, thank You for quick reaction!