Skip to main content
BurtonDev
Inspiring
July 13, 2017
Answered

Where can I save my folder-level user JavaScripts? Path is missing...

  • July 13, 2017
  • 3 replies
  • 2812 views

The documentation says to use the config.js file. I can't find a path for this. I tried app.getPath("user","javascript"); and got an error. I'm running Acrobat Pro DC continuous release on a Windows 10 machine.

I can find the app js file, but Adobe doesn't allow me to save my scripts there.

I need to save to the folder-level to run a Net.HTTP request.

Thanks!

This topic has been closed for replies.
Correct answer try67

You need to use the "app" folder, not the "user" folder.

3 replies

BurtonDev
BurtonDevAuthor
Inspiring
July 13, 2017

Here's more details on the issue and the correct answer for anyone who needs additional clarification.

My first attempt at saving my script to a folder-level file did not work because Acrobat was open. These scripts are loaded when the application initializes, and are not authorized to be edited while Acrobat is running.

I also tried to save it to the wrong file. I searched for a config.js file and found one here (don't use this file!):

C:\Program Files (x86)\Adobe\Acrobat DC\Acrobat\WebResources\Resource0\static\js

Looking through old documentation and info on the web, I thought I had to save it to a user folder. This worked for older versions of Acrobat but does not work for Acrobat DC.

Upon try67's suggestion, I ran app.getPath("app","javascript"); and on my computer, which is running Windows 10, it returned:

C:\Program Files (x86)\Adobe\Acrobat DC\Acrobat\Javascripts

This is the correct location. On Mac or older versions of Windows, the location may be different. Run the app.getPath function to find it.

To make and edit my config.js file, I simply created the file in another location (desktop is convenient), and after saving, dragged it into the folder I referenced above. This action prompts the user to authenticate from an administrative account. Once authenticated, the file is copied and Acrobat can then be opened, and it will load with the scripts. If I need to make more edits, I can close Acrobat, drag the file back onto my desktop and edit it from there.

Thanks try67 for the prompt, very helpful reply!

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
July 13, 2017

You need to use the "app" folder, not the "user" folder.

Legend
July 13, 2017

What error exactly?