GroupDocs.Comparison compares differently documents that has watermarks

Hi Guys, could you please assist me on a question I have.
I an trying to compare two .docx files using GroupDocs.Comparison (code below) :

   string source = @"C:\temp\image.docx";
   string target = @"C:\temp\image_.docx";

    using (Comparer comparer = new(source))
    {
        comparer.Add(target);
        comparer.Compare(
            @"C:\temp\ImageTest_report.docx",
            new CompareOptions {
                DetalisationLevel = DetalisationLevel.High,
                DetectStyleChanges = true,
                CalculateCoordinates = true,
            });

        ChangeInfo[] changes = comparer.GetChanges();
        // check changes.Count() > 0;
    } 

For two files (image.docx and image_.doxc) I have 0 changes, even there is a watermark that has different location in both files.

When I make a copy of image_.docx and manually move watermark, it does show me that there is a shape deleted and shape inserted.

Question is why for image.docx and image_.docx watermark location is ignored, but for image.docx and image_1.docx it is not ignored?

For me ignoring of watermark works, however I would like to understand difference in behaviour of comparison.

I am also attaching all 3 files.image_1.docx (30.9 KB)
image.docx (30.7 KB)
image_.docx (30.7 KB)

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-3352

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.

1 Like

Thank you @Atir_Tahir. I am also trying to understand difference in behaviour. For us scenario where watermarks are ignored works perfectly as we would like to ignore them and compare rest of document content.

If it will be fixed, is there any way to compare document with GroupDocs and ignore watermark:

  • Pass additional parameter (so it would work as per first scenario)
  • Or maybe to compare text and styles of document only (but no image comparison)

We would like to know if it would work for both .docx and .pdf files too?

So, first scenario is more feature rather than bug for us, and we are happy to have this feature, as long as we do understand how it works. :slight_smile:

I guess question also was also what is different is those free documents, as per me all three should be either same or all three not the same,but at the moment two of them are the same and one different.

1 Like

This ticket is still under investigation. We’ll surely notify you about Comparison behavior for these files.

1 Like

Hi @Atir_Tahir,

I just wanted to check on issue mentioned above and if there is any progress on it?
Thanks in advance.

@usernamename

Your ticket is still under investigation.

Hi Guys, @atir.tahir,

I was just wondering if there is any progress on a ticket above, as for us this is a blocker at the moment that prevents us from getting a licence for GroupDocs?

@usernamename

We are still investigating this scenario.

@usernamename

Please take a look at this - output.zip (25.1 KB). Are you looking for such a result?

Hi @atir.tahir, thank you. Which two of provided files you compared two get this result? It seems for me that image.docx and image_1.docx were compared. In this case I was able to get result that was indicating something is different before too.

What we are trying to understand why in one case (as described above) watermark during comparison was ignored, and files are the same, and it is not ignored in second case, and files are not the same, because all three document visually look different.

Please let me know if my question make sense or you would like some more details.

@usernamename

Please take a look at these files.zip (73.4 KB). You can see comparison changes (watermark inserted and deleted).
We’d appreciate if you share more details with screenshots.

Yes, thank you. Some screenshots below:
First case (Proof watermark is in different location visually but files are still the same):

image.png (10.4 KB)

Second case (excepted to be NOT the same, as watermark was moved):

image.png (9.0 KB)

So we just trying to understand first case, why files after comparison are the same.
Hope it helps and thank you for quick answer.

@usernamename

Thanks for the details. We’ll now further investigate it.

The issues you have found earlier (filed as COMPARISONNET-3352) have been fixed in this update. This message was posted using Bugs notification tool by anton.samarskyy