Free Support Forum -

PDF comparison returns scrambled report using Java

I am using a trial license for compare for java 18.6 and I have turned on summary report and style change detection in the settings. I am using 2 PDFs with a small number of changes between them. It seems to overlay the two documents with different margins, tags a bunch of deletes and one insert with 26 changes. Nothing is highlighted blue or green for the insert and changes. The footer is up in the address block and the header is on page 2. I have attached a zip file with the two files compared and the report.

Here is the code I used:
private static void compareFiles(String file1, String file2, String reportPath)
ComparisonSettings settings = null;
Comparer comparer = null;
ICompareResult result = null;
String suffix = null;

		comparer = new Comparer();
		settings = new ComparisonSettings();
		suffix = file1.substring(file1.lastIndexOf("."));
			suffix = "." + suffix;

		result = FileInputStream(file1), new FileInputStream(file2), settings);
		result.saveDocument(reportPath + suffix);
		System.out.println("Finished compare " + result.getChanges().length + " changes.");
		System.out.println("Report written to " + reportPath + suffix);
	catch(Exception e)
} (254.8 KB)


We are further investigating this issue. Your issue ID is COMPARISONJAVA-426. As we have further updates on it, we shall inform you. Your patience shall be appreciated in this regard.


Your reported issue is resolved in latest release of the API. Please integrate 18.6.1 in your project.

With the 18.6.1 the report is no longer scrambled.


Glad to know that your issue is now resolved.