Copy link to clipboard
Copied
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?
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.
Copy link to clipboard
Copied
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).
Copy link to clipboard
Copied
Is the URL local (file:///...) or HTTP?
Copy link to clipboard
Copied
HTTP
Copy link to clipboard
Copied
No
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Thanks for the link. I see in that PDF:
Acrobat.exe /A "zoom=1000" "C:\example.pdf"
So I was hoping I could so something like:
Acrobat.exe /A "foo=bar" "C:\example.pdf" and access "app.foo" or "this.foo" in JavaScript but it doesn't seem to work. So an FDF file is the only way?
Copy link to clipboard
Copied
Not only is an FDF file the only reasonable way to pass data into the PDF using these options, PDF was built for FDF. It's a fantastic way to get stuff into a PDF. Its not just form data, its all kinds of things. For example, you can update page content with an FDF.