Document.Compare does not Mimic MS Word behavior using .NET

Hi,

When comparing two documents I am getting unexpected revisions. The revisions I am getting are in textboxes in either the header or footer. This doesn’t seem to happen with all textboxes in the header or footers. I have saved the comparison document to inspect the revisions and it seems the comparison is deleting some of the textboxes and then inserting another textbox over the top with the same content.

This occurs when I run:

    var options = new Aspose.Words.Comparing.CompareOptions
                {
                    IgnoreComments = true,
                };
    DocToCompare.Compare(Baseline, "example", DateTime.UtcNow, options)

The above code references the documents below.
This only appears to be an issue in v21.5.0 and not in v21.4.0 or older versions.

The file “Comparison output” is the output when I save “DocToCompare” after the comparison is run.

Comparison output.Docx (13.3 KB)

Baseline.docx (12.9 KB)

DocToCompare.docx (22.9 KB)

@dan457

We have logged this problem in our issue tracking system as WORDSNET-22238. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@dan457 We have completed the analysis of the issue. Aspose.Words produced document is almost the same as produced by MS Word. To get result closer to MS Word you need to specify ComparisonTargetType.New option.

CompareOptions co = new CompareOptions() { Target = ComparisonTargetType.New }; docA.Compare(docB, "am", DateTime.Now);

Could you please check on your side and if the result is acceptable for you, we will close this issue as Not a Bug.