Copy link to clipboard
Copied
Hello there,
I am trying to make a pdf button where i can click on it , retrieve the data from the server , fill a dropdown list from there.
The code :
Net.HTTP.request({
cVerb: "GET",
cURL: "http://newits.devs/getContacts.php",
oHandler:{
response: function(msg,uri,e,h){
app.alert(msg);
}
}
});
But i am getting an error after i click it :
NotAllowedError: Security settings prevent access to this property or method.
At folder level you must define the function. At the button use / call the function.
Copy link to clipboard
Copied
Use a trusted function for this.
Copy link to clipboard
Copied
Can you please direct me to a resource on how to use it ?
Or Maybe you can tell me what should i add in the above code so it's using a trusted function ?
Thanks in advance.
Copy link to clipboard
Copied
https://acrobatusers.com/tutorials/using_trusted_functions/
Look also at Acrobat Javascript Reference.
Copy link to clipboard
Copied
Thanks a lot
But it only works on startup (folder level script ) not on button click, still giving me the same error message.
The documentation says that it can work on "trusted documents" .
How can i make my document trusted ? i really searched a lot and haven't find any.
Copy link to clipboard
Copied
Have you created a trusted function? And does you use this function at the button?
Copy link to clipboard
Copied
I did create the trusted function and put it on the action when the button clicks , but it still gives me
NotAllowedError: Security settings prevent access to this property or method.
it works fine though as a folder level script
Copy link to clipboard
Copied
At folder level you must define the function. At the button use / call the function.
Copy link to clipboard
Copied
Thanks a lot Bernd,I really appreciate your help and support.
Yes this works as well, it's very unfortunate though that there is no way that the document itself can't have trusted functions without depending on folder level scripts.
Copy link to clipboard
Copied
Trusted functions in the document makes no sense.
For security reason trusted functions must be defined at folder level.
Copy link to clipboard
Copied
I have one followup question...could this application not even work on google docs then?
Copy link to clipboard
Copied
Try a forum for Google Docs.
Copy link to clipboard
Copied
the problem would be with adobe not google docs...but if you say it is a file level...it should work right?
Copy link to clipboard
Copied
What is the problem?
Copy link to clipboard
Copied
please read above...when I say "problem" I mean the restraint is with adobe. You say that trusted documents must be on a file level. So I am asking if we can use google docs then for those files....it is a file/folder level.
Copy link to clipboard
Copied
No. You must use a js-file at one of the two Javascript folders.
Copy link to clipboard
Copied
Hi Bernd. I'm in the same situation than Joanna. I've read numbers post over internet and i cant make Net.HTTP.request works on acrobat reader (11 or dc). Allways "NotAllowedError" error. The code is in Config.js in acrobat javascript folder, and attach to a menu.
It works well on PRO but not on Reader. Do you have an idea ???
My goal was to send the PDF modified by user on a http server.
Thanks
Copy link to clipboard
Copied
Do NOT edit config.js. Restore it exactly and then create a new startup JS file in the user startup folder. But that won't make it work in Pro. The quick bart shows an F in box 4, meaning you need "forms rights". These can ONLY be granted by AEM software, POA, expect 5-6 figure license fees. Generally it will be cheaper to license Acrobat for each user, or give up on the idea of using this method. Consider using the existing SUBMIT mechanism, which is available in Reader and without startup scripts.
Copy link to clipboard
Copied
I can make it work with "submitform" but my goal is to make it transparent for users. If i use "submitform" i alwways have to click on a message box (status variable). I just want that users click on a button and nothing else.
I think adobe has "blocked" Net.HTTP.request on READER to make user buy Pro version
Thanks for your help
Copy link to clipboard
Copied
"I think adobe has "blocked" Net.HTTP.request on READER to make user buy Pro version"
Yes, of course. That's why Reader exists - to create an appetite for paid-for features. Adobe's aim is to sell it everyone, not just creators. But, for the price of a few hundred licenses, AEM enabling is an alternative for a very few paths.