How to get the total differences for two PDFs

Tags: #<Tag:0x00007f70b9df3c08>

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.

© Copyright 1996 - 2018, i-net software; All Rights Reserved.