NotAllowedError on

I'm trying to get a form button that will add a watermark text which would include the user's name as it appears from the program's preferences. In its most basic form, I'm trying to do this:


However, I get the following error:

NotAllowedError: Security settings prevent access to this property or method. [...]

Can anybody help?


Mr Gou

Voted Best Answer

You cannot get the identity information form a normal form context. See the documentation for the identity object:

It says "The identity object properties are only accessible during batch, console and application initialization events to protect the privacy of the user. See Privileged versus non-privileged context for details.".

So, if you need to access the identity information, you will need to install a document level script that establishes a function with a privileged context that you would then call from your form. This means, that you would need to make this change on every computer that is used to process your form.

Karl Heinz Kremer
PDF Acrobatics Without a Net
PDF Software Development, Training and More...

By Karl Heinz Kremer   

Please specify a reason: