@benestom After unprotecting and saving the second document and further comparing the resulting document using Aspose.Words there are no differences on 45th page. So it looks like MS Word changes something in the document. I have simplified your documents manually in XML editor and found the difference is in internal hyperlink representation: v1.docx (16.3 KB) v2.docx (18.5 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): WORDSNET-26674
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.
@benestom Yes, the issue is already resolved in the current codebase. The fix will be included into the next 24.4 version of Aspose.Words (April 2024). We will be sure to let you know once it is published.
@benestom
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): WORDSNET-26873
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.
good day, I still found one problem, I am sending whether it is the same or different. I am sending two documents. But it’s just an excerpt from a big documentary. If I compare the documents, the difference is whether I use:
@benestom Do you mean the difference in hyperlink? It looks like the same problem. Actually there is a difference in field codes of the problematic hyperlink. In one document hyperlink is not enclosed into double quotes in another document it is enclosed into double quotes in the hyperlink field code.
Thank you for the answer and explanation, I am still sending two documents, you will not wonder why the image is marked as changed when compared, but no one changed it.
good day,
I also noticed that for one document, if I accept the revision marks in aspos, then after comparing the same document, changes occur between the documents. (compering primeAccept with prime)
If I accept revision marks in MS Word, there are no changes in the document.
docPrime = new Document(".../prime.docx");
if (docPrime.Revisions.Count > 0)
{
docPrime.Revisions.AcceptAll();
}
docPrime.Save("C://temp/test/primeAccept.docx");
@benestom Unfortunately, it is not quite clear how to reproduce the problem. You cannot compare document with revisions. Before comparison all revisions must be accepted. If possible could you please provide a full code or step by step manual how to reproduce the problem?
there are revision marks in the document, after acceptance, see the code and save, try to compare the documents in the MS Word application. Yes, you must accept revision marks again when comparing.
I am trying to create a simple example from multiple operations.
@benestom What document the output document produced by Aspose.Words should be compared with?
The first document is Aspose.Words document produced by the following code:
Document doc = new Document("in.docx");
doc .Revisions.AcceptAll();
doc .Save("first.docx"); //<----- this is the first document
What is the second document it should be compared with?
@benestom Unfortunately, I cannot reproduce the problem on my side. I have created a document using Aspose.Words using the following code:
Document doc = new Document(@"C:\Temp\in.docx");
doc.Revisions.AcceptAll();
doc.Save(@"C:\Temp\out.docx");
Then accepted all revisions in in.docx document and saved it as ms.docx.
Then compared out.docx with ms.docx documents using MS Word and MS Word does not show any changes in the document.
I compared out.docx with ms.docx documents using Aspose.Words and it also does not show any chnages:
Document doc_out = new Document(@"C:\Temp\out.docx");
Document doc_ms = new Document(@"C:\Temp\ms.docx");
doc_out.Compare(doc_ms, "AW", DateTime.Now);
Console.WriteLine(doc_out.HasRevisions);
doc_out.Save(@"C:\Temp\result.docx");
@benestom Thank you for additional information. I managed to reproduce the problem but only if accept revisions in the source document upon comparing documents. If accept revisions in the source document using MS Word and save it and then compare documents, MS Word does notsee any differences:
Aspose.Words: out.docx (29.2 KB)
MS Word: ms.docx (36.8 KB)
The same problem occurs if compare the source document with ms.docx if accept revisions in the source document upon comparing documents. So I do not see problem in Aspose.Words.