Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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?

New Here ,
Sep 13, 2016 Sep 13, 2016

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.

TOPICS
Acrobat SDK and JavaScript , Windows
1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 13, 2016 Sep 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 13, 2016 Sep 13, 2016

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

event.target.flattenPages();

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 13, 2016 Sep 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 13, 2016 Sep 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 13, 2016 Sep 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 13, 2016 Sep 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 13, 2016 Sep 13, 2016

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 13, 2016 Sep 13, 2016

You can just right-click and delete them in Adobe.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 13, 2016 Sep 13, 2016

After you run the action, open the JavaScript console by pressing Ctrl+J to see if any errors are reported.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 13, 2016 Sep 13, 2016

This is a file from an architect who has signed and sealed it (which is how all of them will be) so not sure if this is why I got this when I pressed Ctrl + J...

Version 10.0
Acrobat SOAP 10.0

NotAllowedError: Security settings prevent access to this property or method.
Doc.flattenPages:1:Batch undefined:Exec

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 13, 2016 Sep 13, 2016

You have your answer. You're not allowed to flatten the file due to the security restrictions placed on it by its author.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 13, 2016 Sep 13, 2016
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines