Copy link to clipboard
Copied
Hi,
I want to make a button on my pdf to insert pages from another pdf. However I keep getting
the security settings prevent access error (it works on the console tho).
I heard about the folder level script with this :"app.getPath("user","javascript")";, But I am getting this error:
"GeneralError: Operation failed.
App.getPath:1:Console undefined:Exec
2
undefined".
The "app.getPath("app","javascript")" is working fine, but I'm not sure how to create a usuable function over there to be use for my button ... ?
Any help would be greatly appreciated,
Thank you
Copy link to clipboard
Copied
Please post the exact name of the Adobe program you use so a Moderator may move this message to that forum
Copy link to clipboard
Copied
Adobe acrobat pro
Copy link to clipboard
Copied
You need to create a trusted function that executes this command and place it in a .js file in that folder.
See here for more information: https://acrobatusers.com/tutorials/trust-and-privilege-in-acrobat-scripts
Copy link to clipboard
Copied
I see. But my "app.getPath("user","javascript")" is undefined... The folder doesnt seems to exist. Can I put the .js file at the "app.getPath("app","javascript")" location ?
Thank you for you help
Copy link to clipboard
Copied
It also seems that trusted function required a trusted context to be called... How can I do this on my document ?
Copy link to clipboard
Copied
Yes, you can use the other folder. And that folder is the trusted context.