I'm trying to add an alert box via javascript so that when the user first opens the pdf document, an alert box with my disclaimer comes up and the user must click ok before viewing the document. I'm using standard v 7.0, and don't seem to have the javascript console. Can this be done? They will be opening the pdf file from a cd. Where can I find the correct code? Thanks
You will have to download a short appliction level JavaScirpt from the [link:http://www.adobe.com/devnet/acrobat/] documentation tab called "TestDebugger for Windows and Macintosh" and install the contents of the compressed library into Acrobat's JavaScript appliction folder to create the JavaScript Debugging Console.
You can also add the following JavaScirpt to Acrobat's JavaScript appliction folder to open the JavaScript conosle from the "Advanced" Menu option:
// add JavaScript Console to Acrobat's Advanced menu option
app.addMenuItem({
cName: "JavaScriptConsole",
cUser: "JavaScript Console",
cParent: "Advanced",
nPos: 7,
cEnable: (true),
cExec: "console.show();"
});
If you goto [link:http://www.windjack.com/products/freestuff.php]JavaScripts Created With AcroButtons] and download the JavaScript Console for Adobe Reader 7.0[/rul] compressed library. You can extract the files to Acrobat's application JavaSript file you will not only have the debugging console but also a toolbar button.
To have any application level JavaScript become effective after editing or adding you must exit Acrobat/Reader and restart the appliction.
This will not provide you with the Document Level JavaScirpt editor, but one could execute a JavaScript through the console that would become a document level JavaScript.
You might also want to get a copy of the [url=http://www.adobe.com/devnet/acrobat/javascript.php]Acrobat JavaScript docuemntaiton[/url].
George Kaiser