java.lang.Object
com.aspose.words.ComparisonTargetType
public class ComparisonTargetType
- extends java.lang.Object
Utility class containing constants.
Allows to specify base document which will be used during comparison. Default value is CURRENT.
Relates to Microsoft Word "Show changes in" option in "Compare Documents" dialog box.
Example:
Shows how to specify which document shall be used as a target during comparison
Document doc1 = new Document(getMyDir() + "Document.CompareOptions.1.docx");
Document doc2 = new Document(getMyDir() + "Document.CompareOptions.2.docx");
//ComparisonTargetType with IgnoreFormatting setting determines which document has to be used as formatting source for ranges of equal text.
CompareOptions compareOptions = new CompareOptions();
compareOptions.setIgnoreFormatting(true);
compareOptions.setIgnoreCaseChanges(false);
compareOptions.setIgnoreComments(false);
compareOptions.setIgnoreTables(false);
compareOptions.setIgnoreFields(false);
compareOptions.setIgnoreFootnotes(false);
compareOptions.setIgnoreTextboxes(false);
compareOptions.setIgnoreHeadersAndFooters(false);
compareOptions.setTarget(ComparisonTargetType.NEW);
doc1.compare(doc2, "vderyushev", new Date(), compareOptions);
doc1.save(getArtifactsDir() + "Document.CompareOptions.docx");
Field Summary |
static final int | CURRENT = 0 | |
This document is used as a base during comparison.
|
static final int | NEW = 1 | |
Other document is used as a base during comparison.
|
CURRENT = 0 | |
public static final int CURRENT |
-
This document is used as a base during comparison.
NEW = 1 | |
public static final int NEW |
-
Other document is used as a base during comparison.
See Also:
Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
Aspose.Words Support Forum - our preferred method of support.