How to get the total differences for two PDFs

Comparing two files with the i-net PDFC API is quite simple. Just create a PDFComparer instance, start the comparison and assign the result to a local variable.

ResultModel result = new PDFComparer().compare( <file1>, <file2> );

Now, to get the total differences of all types, just call

int differences = result.getDifferencesCount( false )

With the boolean parameter of getDifferencesCount() you may activate the filter for certain types of differences. The filter is set by setTypeVisible() with a default visibility for all types of true.

Please note that there are a lot of additional API features to configure the comparison and to present the result.