I am working with a trial and a trial license key with GroupDocs.Compare 17.3.2 and was comparing PDFs. The report generated has a summary page which is missing the Style changes and the text of the PDF is truncated in multiple places. I have attached a zip file with the two PDFs used for compare and the result page generated from ICompareResult.saveDocument().
The code used was:
private static void compareFiles(String file1, String file2, String reportPath)
{
ComparisonSettings settings = null;
Comparer comparer = null;
ICompareResult result = null;
String suffix = null;
try
{
comparer = new Comparer();
settings = new ComparisonSettings();
settings.setGenerateSummaryPage(true);
settings.setStyleChangeDetection(true);
suffix = file1.substring(file1.lastIndexOf("."));
if(!suffix.startsWith("."))
{
suffix = "." + suffix;
}
result = comparer.compare(new FileInputStream(file1), new FileInputStream(file2), settings);
result.saveDocument(reportPath + suffix);
System.out.println("Finished compare " + result.getCountOfErrors() + " errors and " + result.getChanges().length + " changes.");
System.out.println("Report written to " + reportPath + suffix);
}
catch(Exception e)
{
e.printStackTrace();
}
}
Compare.zip (152.5 KB)