Show comments and Track changes


#1

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


#2

@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);

#3

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


#4

@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.


#5

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


#6

@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.