Closed florianbepunkt closed 6 years ago
Yes, That is a default behavior. It exits as soon as a mismtach is found.
To compare all pages, use something like this
pdfutil.compareAllPages(true);
@vinsguru thank you! would it also be possible to compare multiple pdfs? for example compare three documents?
@florianbepunkt No. You can do that yourself - simply as shown here.
List<String> pdfsList = Arrays.asList("a.pdf", "b.pdf", "c.pdf", "d.pdf");
compareAll(pdfsList);
public boolean compareAll(List<String> pdfsList){
for(int i=0; i < pdfsList.size() - 1; i++){
if(!pdfUtil.compare(pdfsList.get(i), pdfsList.get(i+1))){
return false;
}
}
return true;
}
Use case: I have a couple of pdfs with slight differences on multiple pages. I want to use the tool to highlight the differences.
Exspected outcome: Multiple png files with the highlighted differences
Actual outcome: I only get the first page with the highlighted differences
Is this intended behaviour or am I missing something
Compile & executing