# How to get the total differences for two PDFs

**URL:** <https://faq.inetsoftware.de/t/how-to-get-the-total-differences-for-two-pdfs/46>\
**Category:** API\
**Tags:** v3.x\
**Created:** [June 2, 2016, 8:56am UTC](https://faq.inetsoftware.de/t/how-to-get-the-total-differences-for-two-pdfs/46 "2016-06-02T08:56:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![KarstenHeinrich](https://faq.inetsoftware.de/user_avatar/faq.inetsoftware.de/karstenheinrich/32/20_2.png) [@KarstenHeinrich](https://faq.inetsoftware.de/u/KarstenHeinrich)\
**Post date:** [June 2, 2016, 8:56am UTC](https://faq.inetsoftware.de/t/how-to-get-the-total-differences-for-two-pdfs/46/1 "2016-06-02T08:56:24Z")

</div>

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.
