A document can contain some metadata information, such as author, organization, etc. GroupDocs.Comparison allows you to select metadata sources when saving the output document.
Possible metadata sources are as follows:
Source document metadata
Target document metadata
User-defined metadata
To set output document metadata, follow these steps:
Instantiate the Comparer object. Specify the source document path or stream.
Call the add() method. Specify the target document path or stream.
Instantiate the SaveOptions object. Call the setCloneMetadataType() method to set the appropriate MetadataType variant.
Call the compare() method. Specify the SaveOptions object as a parameter.
The following code snippets show how to set output document metadata: