I think you will have to set up the JS file as a folder-level script. Then
you'll be able to call the functions in it from any PDF opened no your
That's not what a folder-level script means. It means a script that is
located in a special folder so that it is launched when Acrobat/Reader is
launched, before any file is opened.
If you place a function in such a script then any PDF you open will have
access to this function.
Try67, thanks. You answered my question precisely.
Of course, I now realize that I asked the wrong question. Since the PDFs will be accessed via an LMS on a server, I cannot (at least, I don't think I can...need to verify...) use a folder-level script. I'm pretty sure I need a document-level script. Now, if that means I have to copy/paste all the functions I need into a document-level script, it would work, but I suspect that becomes a maintenance nightmare down the road if I ever have to update/replace code on each PDF.
As far as I know, it's impossible, but maybe I'm wrong on this...
But why should it be impossible for you to use folder-level scripts? You
just need to place the files at the proper location on the machine(s) where
Acroabt is running. Updating them should not be different than updating any
more software/file over a network, maybe even easier since it doesn't
requires any actual installation, just to copy a file somewhere on the local
Unless I misunderstand what you are suggesting. Can you perhaps offer a syntax sample to clarify?
I'm not sure I understand how you're using Acrobat. Is it installed on each
machine, or on a server? (if the latter, you should be aware that Acrobat is
not a server application, and I'm not sure using it that way is allowed by
So no, Acrobat is not installed on a server. My target audience should all have the latest version of the Adobe Reader. I (as a designer/developer) am using Acrobat to create a media-enhanced PDF for training purposes.
I don't know these technologies, so I'm not sure about that, but it seems to
me that you will be able to do it if you installed the folder-level script
on the local machines with Reader. If that's not possible, I'm not sure I
have other suggestions.
You have been very helpful and I appreciate it. Your original answer is correct: the folder-level script is the way to go. Unfortunately, I have 300K+ end-users and the process to get a JS file installed is prohibitive, which is why I was hoping to attach it at the document-level.
I can still copy & paste all that code into the PDF at the document-level, it just becomes a maintenance headache and another step in the development process.
Thanks for all your time and help. It is greatly appreciated.
If you do end up having to load all your scripts at the document level, it can be done in batch using an Adobe Acrobat batch sequence and