Comparison of Word files does not highlight style changes in .Net

I am using Comparison for

  • GroupDocs.Comparison API version: 23.11.0.
  • Development environment details: .NET Framework 4.8
    I am testing Word comparison and it detects style of paragraph chang and line break insert change but does not highlight them like it does with Live demos.

My code:
using GroupDocs.Comparison;
using GroupDocs.Comparison.Options;
using GroupDocs.Comparison.Result;
using NS_No9.仕様差分分析.Service;

using System.IO;

using System.Linq;

namespace NS_No9.仕様差分分析
{
public static class GroupDocsApi
{
public static ChangeInfo[] compareDoc(string source, string target, string output)
{
// Using Group Docs API to compare word
using (Comparer comparer = new Comparer(source))
{
comparer.Add(target);

            // Options for Group Docs API
            CompareOptions compareOptions = new CompareOptions()
            {
                //CalculateCoordinates = true,
                MarkChangedContent = true,      // Fill color image outline
                DetectStyleChanges = true,      // Detect style change
                ShowDeletedContent = true,
                ShowInsertedContent = true,
                InsertedItemStyle = new StyleSettings()
                {
                    HighlightColor = System.Drawing.Color.Turquoise,
                    FontColor = System.Drawing.Color.DarkGreen,
                    IsUnderline = true,
                    IsBold = true,
                    IsItalic = true,
                },
                DeletedItemStyle = new StyleSettings()
                {
                    HighlightColor = System.Drawing.Color.Red,
                },
                // Options custom for style change
                ChangedItemStyle = new StyleSettings()
                {
                    HighlightColor = System.Drawing.Color.Yellow,
                },
                GenerateSummaryPage = false,
                ExtendedSummaryPage = false,
                CompareVariableProperty = true,
                //CompareDocumentProperty = true,
                CompareBookmarks = true,
                //SensitivityOfComparison = 100,
                HeaderFootersComparison = true,
                CalculateCoordinates = true,
                DetalisationLevel = DetalisationLevel.Middle,
                MarkNestedContent = true,
                WordTrackChanges = false,
                ShowRevisions = true,
                LeaveGaps = false,
            };

            // Start compare with options
            comparer.Compare(output, compareOptions);
            ProcessBar.UpdateProcessBar(40);    // Percent for process bar

            // Get changes of word
            ChangeInfo[] changes = comparer.GetChanges();
            FileStream fileStream = null;
            fileStream = File.OpenRead(output);

            // Path of the temp folder
            string tempDirectory = Path.GetTempPath();

            // Count pages number of file output word and list page  of file output word
            Document document = new Document(fileStream);
            int pages = document.GetDocumentInfo().PageCount;
            int[] pageNumbers = Enumerable.Range(1, pages).ToArray();

            // Create preview images of pages
            PreviewOptions previewOptions = new PreviewOptions(pageNumber =>
            {
                var pagePath = Path.Combine(tempDirectory, $"result_{pageNumber}.png");
                return File.Create(pagePath);
            });
            previewOptions.PreviewFormat = PreviewFormats.PNG;
            previewOptions.PageNumbers = pageNumbers;
            document.GeneratePreview(previewOptions);
            fileStream.Close();
            ProcessBar.UpdateProcessBar(60);    // Percent for process bar

            return changes;
        }
    }
}

}

Thank you,
TrucNV

1 Like

@nguyentruc
This issue is reproduced at our end. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): COMPARISONNET-3879

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

I bought license Developer OEM. So i want to support on a priority basis

@nguyentruc

You have to separately avail the paid support. It’s not included with the license purchase.

Has this issue been fixed yet? I purchased a GroupDocs.Comparison for .NET (OEM Developer) license. This issue will have a major impact on how our project develops.

@tronghieu88

This issue is expected to be fixed in API version 24.4. As we have any further updates, we’ll notify you.

Thank you, please let me know when the updated version 24.4 is available, I really need it for our project

1 Like

@tronghieu88

Version 24.4 is expected to be released by the end of April 2024. We’ll notify you as the release get on-board.

Urgent action is required to resolve this problem swiftly. Its adverse effects on our project cannot be overstated, emphasizing the critical need for immediate attention.

@tronghieu88

I understand the urgency of the situation and the importance of resolving the problem swiftly. The fix will be available in version 24.4 and the release of 24.4 will be available by the end of April 2024.

Can we verify if version 24.4 has the necessary fixes to tackle this problem and if its release is set for the end of this month?

@tronghieu88

We are actively working to resolve this issue in version 24.4. If any obstacles arise, we will promptly provide a hotfix.

Thank you. I eagerly anticipate receiving news about the 24.4 update by the end of April at the earliest opportunity. I remain optimistic that this update will effectively address the issue I’m currently encountering.

We are actively working on resolving this issue and making every effort to include it in the 24.4 release. However, if any unforeseen obstacles arise, we will prioritize delivering a hotfix as soon as possible.