Copy link to clipboard
Copied
I have created a PDF form using Acrobat Pro X, in order to use a few restricted functions I created a .js file and included all those functions as trusted functions.
To use these functions I placed this .js file in the Javascripts folder on my system.
But I don't see such a folder on systems with only Adobe reader, instead I see a folder named "JSCache" it doesn't show any .js files in it and if I place my custom .js file in it my form doesn't work properly.
Please guide me in this regard. The following screen might come in handy.
Thanks
You shouldn't be doing anything with the JSCache folder. Leave it alone and add the "Users\(username)\AppData\Roaming\Adobe\Acrobat\Privileged\10.0\JavaScripts" folder, or whatever it is for the Reader version you're using. The point is you have to manually create the Privileged folder and the two other folders underneath it.
Copy link to clipboard
Copied
If the JavaScripts directory does not exist, you will have to create it.
Copy link to clipboard
Copied
Thanks for the reply khkremer but that doesn't help. I checked in the JSCache and found this;
Copy link to clipboard
Copied
You shouldn't be doing anything with the JSCache folder. Leave it alone and add the "Users\(username)\AppData\Roaming\Adobe\Acrobat\Privileged\10.0\JavaScripts" folder, or whatever it is for the Reader version you're using. The point is you have to manually create the Privileged folder and the two other folders underneath it.
Copy link to clipboard
Copied
Correction: Thanks George, I was placing the Privileged folder in wrong location, I got it working!
Copy link to clipboard
Copied
You're not adding the correct folders, so remove any that you've manually added.
You need to add a Privileged folder in the Acrobat folder, then add a 11.0 folder in the Privileged folder, then add a JavaScripts folder in the 11.0 folder, then add your JavaScript files in the JavaScripts folder. Then restart Acrobat for the code in the JavaScript file(s) to be loaded into Acrobat.
For Reader, things are slightly different, but the pattern is the same.
Copy link to clipboard
Copied
Sorry, I did not realize that you were using Adobe Reader X - for that, you need to follow George's link and create the missing directories.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Thanks for the response George, but I don't have that privileged folder on my system at the location mentioned in that document.
Copy link to clipboard
Copied
Then you need to first create the "privileged" folder, then version number folder, and then the "JavaScripts" folder. You cannot create them in one shot.
If you have both Acrobat and Reader installed, they share the privileged\version\JavaScript folder so if you have folder level scripts for Acrobat you may need to code to those JS files so the code does not run when Reader is opened. I also add a folder named "JavaScriptsNotUsed" to hold JavaScript files I do not want to run or I am developing. This folder allows me to move files from the JavaScripts folder and prevent them being run when Acrobat/Reader starts.
Copy link to clipboard
Copied
That's a useful practice, I will implement it.
Thanks gkaiseril.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now