Show comments and Track changes

Hi Team,

I need to display the comments and track changes once the document is rendered through ASPOSE and I want to enable them on my java code. Please let me know how to enable the Show comments/track changes.

Thanks,
Prasanna

@pshanmuganathan,

You can meet this requirement by using the following code:

doc.getLayoutOptions().setShowComments(true);
// doc.getLayoutOptions().getRevisionOptions().setShowInBalloons(ShowInBalloons.FORMAT_AND_DELETE);
// doc.getLayoutOptions().getRevisionOptions().setShowRevisionBars(true);
doc.getLayoutOptions().getRevisionOptions().setShowRevisionMarks(true);

PdfSaveOptions opts = new PdfSaveOptions();

doc.save("D:\\temp\\awjava-18.11.pdf", opts);

Hi Awais,

Our requirement is to enable track changes in the Document once it gets rendered. But the markup should not be shown. I mean its user’s wish to show the Markup. So , Ideally We want the rendered document to have the Track changes button enabled but Hide all the Markup when we open the rendered document and let user take the control to view them if he/she wants it.Please Help me on this.

With the solution you have given above, it shows the track changes properly. But I want it to be enabled in the rendered document as well.

THANKS,
Prasanna

@pshanmuganathan,

To ensure a timely and accurate response, please ZIP and attach the following resources here for testing:

  • Your simplified input Word document
  • Aspose.Words 18.11 generated output PDF document showing the undesired behavior
  • Your expected PDF document showing the correct output. You can create expected document by using MS Word.
  • Any additional steps that you think might be required to reproduce the expected output PDF file by using MS Word on our end.
  • Code you are using on your end

As soon as you get these pieces of information ready, we will start further investigation into your issue and provide you more information. Thanks for your cooperation.

Hi Awais,

This cant be explained with code. However, find the attached for your understanding. In the attached screenshot named Input which is my Input document has comments and trackchanges. Also I have enabled All markups(I have highlighted them).
Input.png (83.0 KB)

Now in my rendered document I am using the below code to view these revisions and comments .

document.getLayoutOptions().getRevisionOptions().setShowRevisionMarks(true);

And it renders properly by showing the comments and track changes. For instance look at the screenshot of the Output rendered document below

Output.png (32.9 KB)

Question 1:
Now if you check the output screenshot, it is showing the track changes in the document but the track changes button is disabled by default. I have highlighted them. So in the rendered document if user types , the changes wont be tracked unless they manually enable the Track Changes button. How to do that ?

Question 2:
I do not wan the comments and Track changes to be displayed when the document is rendered. This can be done by clicking the No Mark Up. You can find the screenshot below for your reference.

No-Markup.png (36.5 KB)
So this Markup is left to user for him to enable by clicking ShowAllMarkup.

So ideally from question 1 - I want the track changes should be enable through program in the rendered output document and it should not be enable manually by the user using the output document.

and from question2 - the rendered document should contain all the comments/Track changes but they should be hidden at first(NoMarkUp) when the document is rendered and control is given to the user if they want the enable them after.

Hope you get my queries. Please get back ASAP.

Thanks,
Prasanna Shanmuganathan

@pshanmuganathan,

You can enable/disable Track Changes button by using the following code:

document.setTrackRevisions(true);

We have logged your requirement in our issue tracking system. We will provide API to set different options of “Display for Review” drop down. Your ticket number is WORDSNET-17831. We will further look into the details of this requirement and will keep you updated on the status of the linked issue.

@pshanmuganathan,

Regarding WORDSNET-17831, to show/hide revisions you can try using the following RevisionOptions.

doc.LayoutOptions.RevisionOptions.ShowRevisionMarks = false;
doc.LayoutOptions.RevisionOptions.ShowRevisionBars = false;

The output will be exactly the same like with MS Word.

Or please attach the expected output PDF showing the desired results here for further analysis.
We cannot find the way to show/hide revision marks and bars in Acrobat Reader.

Thanks for your cooperation.

@pshanmuganathan,

We are waiting for your further input on this topic. Please see my previous post and share your further thoughts. Thanks for your cooperation.

@pshanmuganathan,

Regarding WORDSNET-17831, we have completed the work on your issue and come to a conclusion that we would not be able to implement the fix to your issue. Your issue (WORDSNET-17831) is now closed with ‘Won’t Fix’ resolution. Aspose.Words already provides the requested feature. Please see my previous posts for details.