We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Accept revisions issue

Hi,
Aspose.Words for Java (tested v15.3.0.0) does not correctly accept revisions.
This test file contains some text followed by a paragraph which has been tracked as deleted.
When accepting all track changes with Ms Word (v2010) the text remains.
However Aspose removes text and paragraph.

Document doc = new Document("test.rtf");
doc.acceptAllRevisions();
System.out.println(doc.getText().length()); // Returns 0

Hi Romain,

Thanks for your inquiry. I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-11785. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi Romain,

Can you please provide us the code that was used to generate the test.rtf shared in the first post of this thread?

How to create a similar test file:

  1. create new document in Ms Word
  2. type “test”
  3. press ’return’
  4. activate track changes
  5. press ‘backspace’
  6. press ‘delete’
  7. save as rtf
  8. Run this code:
Document doc = new Document("test.rtf");
doc.getFirstSection().getBody().getParagraphs().get(1).remove();
doc.save("test.rtf");

In this case, Ms Word keeps the text “test”, whereas Aspose Words removes it when accepting all track changes (doc.acceptAllRevisions();).

Hi Romain,

Thanks for sharing the detail. We will update you via this forum thread once this issue is resolved.

The issues you have found earlier (filed as WORDSNET-11785) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.