Skip to main content
Inspiring
January 23, 2018
Answered

Is there a way to access arbitrary Acrobat program arguments in JavaScript?

  • January 23, 2018
  • 2 replies
  • 1203 views

I have a folder-level JavaScript file installed in the user javascript folder. I'm wondering if there's a way to pass a URL as a parameter when launching Acrobat and to have the folder-level JavaScript code access the URL so that it can use that particular URL. Is this possible?

This topic has been closed for replies.
Correct answer Thom Parker

No


Ok, there is a way, but it's old and I haven't tried it.  There are a set of command line parameters you can use when opening a PDF.

http://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/pdf_open_parameters.pdf

One of these is a references to an FDF file. The FDF file could easily contain either a script that sets a document level variable, or it could fill a hidden form field.

2 replies

Joel Geraci
Community Expert
Community Expert
January 23, 2018

Is the URL local (file:///...) or HTTP?

Inspiring
January 23, 2018

HTTP

Thom Parker
Community Expert
Community Expert
January 23, 2018

No

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
try67
Community Expert
Community Expert
January 23, 2018

Not really. You can access a web-service using the Net.HTTP object, but you can't just access a URL and use its contents (unless you convert it to a PDF file first, which is very tricky since it's done asynchronously).