Disable image comparison in PDF documents
Leave feedback
On this page
GroupDocs.Comparison allows you to disable image comparison in PDF documents.
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 CompareOptions object. Set the CompareImagesPdf property to
false
; - Set the ImagesInheritanceMode property to
ImagesInheritance.Source
orImagesInheritance.Target
; - Call the Comparer method. Specify the CompareOptions object from the previous step.
The following code snippet shows how to disable image comparison in PDF documents:
using GroupDocs.Comparison;
using GroupDocs.Comparison.Options;
// ...
using (Comparer comparer = new Comparer("source.pdf"))
{
comparer.Add("target.pdf");
CompareOptions compareOptions = new CompareOptions()
{
CompareImagesPdf = false,
ImagesInheritanceMode = ImagesInheritance.Target
}
comparer.Compare("result.pdf", compareOptions);
}
The result is as follows:
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.