samedi 3 mars 2018

Golden Master Testing with PDFs in Java

I wonder if there is a way to do Golden Master Testing with PDFs in Java? I'm not just looking for a visual comparison, but also for a comparison of internals such as the state of bookmarks and links. Ideally, it is possible to ignore certain properties like the creation date.

As an alternative, I thought about creating a textual representation of the PDF—which includes the mentioned information—and simply diff the resulting file. However, I wasn't able to find a decent solution for doing this either.

Another alternative could be to use a PDF library such as PDFBox and compare the objects e.g. via equals, but I have no experience how easy it is to find the actual difference(s) when equals fails.

Any input is appreciated.

Aucun commentaire:

Enregistrer un commentaire