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

I am completely new to JavaScript and have been playing about with some code. I entered in the following from 'PDF Document Browser
By Thom Parker, WindJack Solutions, Inc.'

app.getPath("app", "javascript");

On the document I entered this into, I had already set up a pop up menu button which showed a list of attached files. Previous to me entering in the above code, the pop up menu worked fine and would open the selected file. Now however, I am getting the following error message:

Acrobat JavaScript Debugger Functions Version 10.0
Acrobat EScript Built-in Functions Version 10.0
Acrobat SOAP 10.0

NotAllowedError: Security settings prevent access to this property or method.
App.openDoc:2:Field Button1:Mouse Up

NotAllowedError: Security settings prevent access to this property or method.
App.openDoc:2:AcroForm:Button1:Annot1:MouseUp:Action1

NotAllowedError: Security settings prevent access to this property or method.
App.openDoc:2:AcroForm:Button1:Annot1:MouseUp:Action1

I have tried the Restore option under the PDF file attachments in the Trust Manager but this seems to be making no difference at all.

Can you please help?
Thanks


Amy Taylor


2 Answers

In the later versions of Acrobat the security restrictions for this method had changed. It can now only be called from a trusted context, ie a folder-level script or a trusted document.
You should search around a bit on these forums and tutorials. This issue was discussed many times in the past.

-------------------------------------
Visit my custom-made PDF scripts website: http://try67.blogspot.com
Contact me personally: try6767@gmail.com


Gilad D (try67)   

getPath can only be executed from the console, in a batch process, or as trusted funciton.

See Using Trusted Functions by Thom Parker.

See The Acrobat JavaScript Console (Your best friend for developing Acrobat JavaScript) by Thom Parker.

To run your code will have to install a file containing some special code in a specific folder available to Acrobat/Reader on each user's system.


George Kaiser   


Please specify a reason: