As a follow up to this issue: Compare result does not match MS Word output - Bookmarks are missing
I’ve run into another case where bookmarks are missing when comparing two documents, and the output differs from the output from Word.
I am comparing two files:
- doc_1.docx which has a bookmarked named bookmark_1
- doc_2.docx which has a bookmarked named bookmark_1 and a new bookmark named bookmark_2
doc_1.docx (23.9 KB)
doc_2.docx (24.0 KB)
After comparing the two files in Aspose.Word, bookmark_2 is lost.
compare-result-aspose.docx (20.4 KB)
In comparison, using the Compare Documents function in Word, the bookmark is retained.
compare-result-word.docx (26.8 KB)
Aspose version: 25.3.0
@dalaArteria
It seems you are experiencing an issue where bookmarks are missing when comparing two documents using Aspose.Words, which differs from the output generated by Microsoft Word. This is a known issue that has been reported previously, where additional bookmarks in the compared document are not retained in the output.
In a similar case, it was noted that when comparing two documents, one with an existing bookmark and another with an additional bookmark, the new bookmark was lost in the comparison result generated by Aspose.Words. This issue has been logged in the Aspose issue tracking system as WORDSNET-22581
, and the team is aware of it.
To address this, you may want to check if you are using the latest version of Aspose.Words, as updates may include fixes for such issues. The problem was reported to have been fixed in a later version, so upgrading to the latest release could potentially resolve your issue.
If you continue to face this problem, I recommend posting your specific use case and the documents involved in the Aspose forum, as the community and support team can provide further assistance and updates regarding the issue.
For your reference, here are some related discussions:
- A user reported a similar issue with bookmarks being lost after comparing documents, and it was confirmed by the Aspose team that they could reproduce the problem and logged it for resolution.
- The issue was acknowledged, and users were informed that they would be notified once it was resolved.
If you have any further questions or need additional assistance, feel free to ask!
Sources:
[1]: Bookmark is Lost after Comparing Documents using Java
@dalaArteria I cannot reproduce the problem on my side using 25.3 version of Aspose.Words and the following code:
Document v1 = new Document(@"C:\Temp\v1.docx");
Document v2 = new Document(@"C:\Temp\v2.docx");
v1.AcceptAllRevisions();
v2.AcceptAllRevisions();
v1.Compare(v2, "test", DateTime.Now);
v1.Save(@"C:\Temp\out.docx");
out.docx (20.4 KB)
As I can see your output document as produced by 25.2 version of Aspose.Words. Please try using the latest 25.3 version.
@alexey.noskov Thanks, I’ve confirmed the original case is resolved in version 25.3.
I have another case below where the bookmark is being lost:
- doc1.docx which has a bookmarked named bookmark_1
- doc2.docx which has a bookmarked named bookmark_1 and a new bookmark named bookmark_2
doc1.docx (23.9 KB)
doc2.docx (24.0 KB)
After comparing the two files in Aspose.Word, bookmark_2 is lost.
compare-result-aspose.docx (20.4 KB)
In comparison, using the Compare Documents function in Word, the bookmark is retained.
compare-result-word.docx (26.9 KB)
@dalaArteria
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-27983
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.