We need to compare two word documents and for this feature, we are using Document.compare(Document, User, Date) API.
We tried to evaluate this API with a specific scenario, where a Smart Art is inserted in the middle of document.
In the revision document, we are seeing two modification one for Smart Art insertion and another for some formatting changes. Ideally, we should get only one revision regarding Smart Art insertion as there is no format changes.
The code used for this feature is given below:
Document doc1=new Document(“10kPart.docx”);
Document doc1=new Document(“10kPart_SmartArtInserted.docx”);
The revisions we got are:
1: Revision[type: 2: FORMAT_CHANGE, parent-node: [Unknown!]
2: Revision[type: 0: INSERTION, parent-node: [Unknown!]
3: Revision[type: 0: INSERTION, parent-node: [Shape: Name: Diagram 1, Alt: ]
In above revisions list, first and second seems to be extraneous.
The documents are attached for your reference.
Please help us in resolving this issue as soon as possible.