Skip to main content
Participating Frequently
September 13, 2016
Question

We are using the flatten fields and comment java script, but it doesn't lock the comment fields. Does anyone have the code to lock all comments so we don't have to do manually?

  • September 13, 2016
  • 3 replies
  • 1348 views

We are using the flatten fields and comment java script, but it doesn't lock the comment fields.  Does anyone have the code to lock all comments so we don't have to do manually?  We are using Acrobat Pro X.

This topic has been closed for replies.

3 replies

Legend
September 13, 2016

If you were to edit a signed document it would destroy the signature. So you have to work with what is signed, not edit it.

Legend
September 13, 2016

Hmm, as described there won't be any annotations: "All annotations—including form fields, comments, and links—on the specified range of pages are flattened. They may have appearances, but they will no longer be annotations."

Do you see something different?

Participating Frequently
September 13, 2016

It is not flattening the comments because the comments can still be deleted.  I ran the script, saved the file and re-opened it.  The comments were delete-able.  If I manually lock the comments before the script, the comments cannot be deleted.

try67
Community Expert
Community Expert
September 13, 2016

What tool are you using to delete these "comments" after you flatten the file?

Legend
September 13, 2016

I'm probably missing something, but my view of "flattening" comments is to turn them into page contents so there are no longer any comments. Given that, there's nothing to lock afterwards. What JavaScript do you use?

Participating Frequently
September 13, 2016

We are using the Flatten Fields and Comments and this is the javascript within it:

event.target.flattenPages();

Inspiring
September 13, 2016

That script used in an action will flatten all fields and comments into regular page contents. Are you saying that it is not flattening any of the comments, just some of the comments,  or something else?