These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

How to run javascript on acrobat?

bhargavabhat
Registered: Sep 23 2008
Posts: 3

I've a pdf file and I want to run javascript on it. How to do it?

Basically, i want to launch acrobat from my application, open a file and print it.
I've been able to launch acrobat from my application and passed the filename argument and it opened. Now how to run the print api on the document?

I've problems running javascript on acrobat and not in syntax,apis and all. I know the apis. I've the code ready but I'm not able to run it on acrobat.

Can somebody please help me??

maxwyss
Online
Registered: Jul 25 2006
Posts: 256
One (if not the only one) possible approach is working via FDF. According to the description of the FDF format in the Portable Document Format specification (if I remember correctly, in section 8.6 in the newest available document), it is possible to include JavaScript code to be executed when the FDF gets loaded.

So, what you would do is create an FDF which opens the according PDF document, and then executes the according script.

HTH

Max Wyss.