By default, the CompareImagesPdf option is true. Follow these steps to turn off image comparison:
Instantiate the Comparer object. Specify the source file path or stream.
Call the add() method. Specify the target file path or stream.
Instantiate the PdfCompareOptions object. Call setCompareImagesPdf(false).
Call setImagesInheritanceMode() with ImagesInheritance.SOURCE or ImagesInheritance.TARGET to choose which document the images in the result are taken from. The default is SOURCE.
Call the compare() method. Specify the PdfCompareOptions object from the previous steps.
The following code snippet shows how to disable image comparison in PDF documents:
CompareOptions.setCompareImagesPdf() and CompareOptions.setImagesInheritanceMode() are still available for backward compatibility, but they are deprecated. Use PdfCompareOptions in new code.