Closed wuws closed 5 years ago
Good idea! I will try to incorporate that. It will take some time, since I don't have much time for this project at the moment...
Great to hear that! thank you so much.
How about using JSONObject to capture the differences? We could return each difference mentioned in the Log by DiffImage.diffImages() then and combine all as a differences JSON. Which could be used in any way we want to.
Something like:
{ "differences":[ { "y1":51, "x1":425, "y2":76, "x2":1105, "page":1 }, { "y1":51, "x1":425, "y2":76, "x2":1105, "page":2 } ] }
To make it backward compatible, we could add an additional method to the PdfCompator class, which will return this differences json on a need by basis.
Just a thought :)
Version 1.1.37 contains a new Method CompareResult.getDifferences(), which gives back a collection of PageArea objects. This could be serialized to json, if needed. But how about this for a start?
It's more a question or polite request - is there a way to recapture differences found in pdfs returned in Log by DiffImage.diffImages() method, so I can pass them to my exception message. Or can you return it in some method as String or something like that?