red6 / pdfcompare

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

Fix comparison of internally rotated PDFs producing incorrectly shaped result #47

Closed enwat closed 5 years ago

enwat commented 5 years ago

I tried your library on some private PDFs. Usually it produces great results, but occasionnaly it gave weird distorted output. Turned out that the PDFs that caused this were internally rotated (see PDPage.getRotation()). This patch fixes it.

Unfortunately, cannot provide the files for testing as they are private (and huge), but I hope it is not necessary for this small patch. It fixes the problem I encountered and doesn't break any existing tests.

finsterwalder commented 5 years ago

Fix will be included in version 1.1.36, which is released shortly and will land in Maven Central in a couple of hours.