Hello, I’ve encountered an issue, where if you compare a document where last sections header/footer has link to previous set, and an empty document, the compare throws: java.lang.IllegalArgumentException: Specified argument was out of the range of valid values.
Parameter name: index
Code snippet to reproduce:
Document doc = new Document("path/to/Lorem.docx");
doc.getSections().get(2).getHeadersFooters().linkToPrevious(true);
doc.compare(new Document(), " ", new Date());
Lorem.docx (15.6 KB)