PDF In-Depth

Adding JavaScript References to the Acrobat Pro 6 Help Menu

JavaScript Code

Advertisement
 

 

Now that we have the files and have given them a home, let's get started with the fun stuff -- JavaScript code. Get your CTRL keys ready, cut-and-pasters. Here comes the nutshell! (I'm not leaving out Mac-ophiles. Something just tells me they'll keep reading to the end of the article.)

  1. Open a new text file in your favorite editor.
  2. Add code similar to the following:
app.addSubMenu({
        cName: "JSHelp",
        cUser: "JavaScript Help",
        cParent: "Help",
        nPos: 4
});

app.addMenuItem({
        cName: "JSGuide",
        cUser: "JavaScript Guide",
        cParent: "JSHelp",
        nPos: 0,
        cEnable: "event.rc=(!(this.documentFileName=='AcroJSGuide.pdf'));",
        cExec: "app.openDoc(
            '/C/Program Files/Adobe/Acrobat 6.0/Help/ENU/AcroJSGuide.pdf');",
});

app.addMenuItem({
        cName: "JSRef",
        cUser: "JavaScript Reference",
        cParent: "JSHelp",
        nPos: 1,
        cEnable: "event.rc=(!(this.documentFileName=='AcroJS.pdf'));",
        cExec: "app.openDoc(
            '/C/Program Files/Adobe/Acrobat 6.0/Help/ENU/AcroJS.pdf');"
});
  1. Name the file "something.js", or whatever you want. (I used "usrAddJSHelp.js".)
  2. Save the file in the "Javascripts" folder under your Acrobat folder. My path is:

        C:\Program Files\Adobe\Acrobat 6.0\Acrobat\Javascripts\

  1. Close Acrobat. Reopen Acrobat. Check it out.

Updated Help menu

Wave goodbye to the cut-and-paste crowd. Bye!

Related Products at PDF Store

Nitro PDF Professional

Nitro PDF Professional, your PDF creation and editing product. Priced at $99.99, Nitro PDF Pro is th... View full product details
Download free demo

Nitro PDF Professional OCR

Nitro PDF Professional OCR gives you all the features of Nitro Pro, plus the added power of Optical ... View full product details
Download free demo

ARTS PDF Aerialist

Take Acrobat to the next level with advanced splitting and merging; flexible bookmark creation and m... View full product details
Download free demo

PDF In-Depth Free Product Trials Ubiquitous PDF

Nitro PDF Professional

the perfect PDF product for business and enterprise, combining an extremely competitive price with a...

Download free demo

XpdfViewer

This ActiveX control (OCX) provides a PDF file viewer component, enabling developers to add PDF viewing...

Download free demo

Ubiquitous PDF: Planning for unexpected cash

It's the end of the financial year and some lucky souls are expecting a tax return. Whether or not the dollars are stacking up for you, it's worth keeping in mind this new PDF tool from Squawkfox.

July 29, 2010
Search Planet PDF
more searching options...







Download PDF Creator

Download The Best of Planet PDF volume 2
Planet PDF Newsletter
Most Popluar Articles
Features

Collating PDFs using JavaScript

Despite the numerous benefits, there can be potential issues with the conversion of paper documents into electronic archives. When scanning paper pages into PDF, it's possible to end up with the odd- and even-numbered pages in separate PDF files. It can be very time-consuming to collate them manually, but there is an easier way. Sean Stewart explains.

Featured Product

BCL easyPDF SDK

BCL easyPDF SDK is a set of PDF Programming Libraries designed specifically to help Software Developers / Programmers build and deploy enterprise class PDF applications for corporate wide PDF...

Platinum Sponsor
Create & Edit PDF - Nitro PDF Software

ARTS PDF

Silver Sponsors

PDF-Tools QuickPDF: The Unrivaled PDF Developer Toolkit