Quantcast
Channel: Adobe Community : Popular Discussions - JavaScript
Viewing all articles
Browse latest Browse all 12130

After setting the "Changes Allowed" security permissions to allow "Commenting, filling in form fields...", I get Not AllowedError on removeField

$
0
0

Hi,

 

Historically I've successfully set the security permission "Changes Allowed" box to "Commenting, filling in form fields, and signing existing signature fields".  This has grayed out the Forms "Edit" menu item, which is my goal since I don't want the user viewing or editing my form fields or my JavaScript.  I'm using Acrobat X.

 

In my most recent document with JavaScript, I'm making use of removeField in many, many spots.  Previously, I never used this function.  Now, whenever my JavaScript encounters a removeField after I set the "Changes Allowed" box as described above, the debugger indicates:
  
      NowAllowedError: Security settings prevent access to this property or method.  Doc.removeField...

 

Again, this error only shows up after making the security settings described above.  In other words, prior to setting the security settings, all of the removeFields work fine.

 

I read about trusted functions but my understanding is that a change needs to be made to the end-user's file system in order to declare some function (removeField, in my case) as trusted or privileged.  I don't have any way to ensure that the user's system is modified.

 

Can you let me know how I might be able to ensure that the Forms "Edit" menu is grayed out while still having my program execute removeField?

 

BTW, I've tried all of the other settings in the "Changes Allowed" box -- "None", "Inserting, deleting, and rotating pages", and "Filling in form fields and signing existing signature fields".  None of these accomplished the dual objective of causing the Forms "Edit" menu item to be grayed out while still allowing removeField to be executed in my program.

 

Thanks for any help you can provide!

 

Dave


Viewing all articles
Browse latest Browse all 12130

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>