GroupDocs.Comparison for .NET 26.2 Release Notes
GroupDocs.Comparison version 26.2 includes multiple improvements to strengthen performance and stability, including enhancements for Word document comparison and a new dedicated options class.
Full list of changes in this release
| Key | Category | Summary |
|---|---|---|
| COMPARISONNET-4684 | Enhancement | Significantly improved comparison performance for large-size Word documents |
| COMPARISONNET-4548 | Enhancement | Ability to specify ChangeType directly in the GetChanges method |
| COMPARISONNET-4688 | Bug | Fixed NullReference exception when comparing Word documents with WordTrackChanges = true |
| COMPARISONNET-4685 | Enhancement | New WordCompareOptions class for Word document comparison |
| COMPARISONNET-4295 | Bug | Document comparison crashes when Word document contains multi-line field code formula |
Major Features
Ability to specify ChangeType directly in the GetChanges method
You can now specify ChangeType directly when calling the GetChanges method to filter which types of changes are returned.
New WordCompareOptions class for Word document comparison
A new WordCompareOptions class has been created specifically for Word document comparison, allowing you to configure Word-specific compare options in a dedicated, type-safe manner.
using (var comparer = new Comparer("source.docx"))
{
comparer.Add("target.docx");
var options = new WordCompareOptions()
{
DetectStyleChanges = true,
DisplayMode = WordCompareOptions.ComparisonDisplayMode.Revisions
};
comparer.Compare("result.docx", options);
}
Public API changes
CompareOptions has been refactored to separate document-type-specific settings. Word-specific options are now available in a dedicated WordCompareOptions class while remaining backward compatible with existing code.
WordCompareOptions(namespaceGroupDocs.Comparison.Options)- Inherits from
CompareOptionsand adds Word-only settings:- DisplayMode – configures how comparison results are displayed; uses the
WordCompareOptions.ComparisonDisplayModeenum; default value is Revisions (Word’s Track Changes mode) - MarkLineBreaks – whether to mark line breaks
- CompareBookmarks – compare bookmarks in Word documents
- CompareVariableProperty – compare variable properties
- CompareDocumentProperty – compare built-in and custom document properties
- RevisionAuthorName – revision author (used when WordTrackChanges is true)
- ShowRevisions – show revisions in the result document
- LeaveGaps – show empty lines instead of inserted/deleted content where applicable
- DisplayMode – configures how comparison results are displayed; uses the
- Inherits from
The properties listed above remain on
CompareOptionsbut are marked as obsolete.These obsolete properties will be removed in a future release.