The following code snippet shows how activate comparison of the variable, Bbuilt and custom properties:
importcom.groupdocs.comparison.Comparer;importcom.groupdocs.comparison.options.CompareOptions;importjava.nio.file.Path;// ...
try(Comparercomparer=newComparer("source.docx")){comparer.add("target.docx");CompareOptionsoptions=newCompareOptions();// to activate comparison of variable properties
options.setCompareVariableProperty(true);// to activate the comparison of built and custom properties
options.setCompareDocumentProperty(true);finalPathresultPath=comparer.compare("result.docx",options);}
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.