Free Support Forum - aspose.com

Revison reject bug

I try reject some revisions and expect result like ms word do it. But it doesn’t. This resivions Itry try reject http://joxi.ru/8An55oRTjW6Dn2 . But result have revision that aspose don’t see http://joxi.ru/RmzKKxJc0wE8e2 . In debug, I see that aspose reject part of text withous “\r”.

code for test.
Document docFirst = new Document(“C:\PAR-5346\test\beforeskipSource.docx”);
ArrayList revImport = new ArrayList<>();
for (Revision item : docFirst.getRevisions()) {
revImport.add(item);
}

for (final Revision item : revImport) {
if (item.getParentNode() instanceof Run){
item.reject();
}
}
docFirst.save(“C:\PAR-5346\test\rejectsSource.docx”, SaveFormat.DOCX);
Hi Mike,

Thanks for your inquiry. The shared screenshot of "rejectsSource.docx" differ from document.
handmade:
In debug, I see that aspose reject part of text withous "\r".
You are rejecting the revision those are instance of Run node. Could you please share some more detail about this query along with expected output document here for our reference? We will investigate the issue on our side and provide you more information.

I rejeted revision only on “Run”, because I didn’t understand why one revision in docx file, for example "INSERT1 ", in aspose have two revisions? one reveision have parent object “Paragraph”, second revision - “Body”.

http://joxi.ru/p27669NSoDWpRm
http://joxi.ru/KAxddo8FM61LEA
Hi Mike,

Thanks for sharing the detail. You are facing the expected behavior of Aspose.Words. There is one Run node in the Paragraph that have revision. Moreover, the Paragraph have paragraph break inserted revision.

In your case, we suggest you please remove such paragraph revision that have only one Run node.