Skip navigation
AndrewL504
Currently Being Moderated

Executing JavaScript in X Pro on Mac

Aug 6, 2012 10:22 AM

Tags: #javascript #acrobat_10_pro

Hello,

 

I recently switched from Windows 7 with Acrobat 9 Standard to Mac OS X 10.8 with Acrobat X Pro.

 

On my windows setup, I could copy javascripts into Acrobat's "Javascripts" folder and those actions would appear on the Document menu. I've copied those same scripts to my Javascript folder on the Mac, but they don't seem to appear.

 

I believe the proper Javascripts folder is:

 

/Applications/Adobe Acrobat X Pro/Adobe Acrobat Pro.app/Contents/Resources/JavaScripts

 

Now that I've dropped the javascripts in there, and restarted Acrobat, I can't seem to find the place to actually run the scripts. In other words, there is no Documents menu, so I'm not sure where those scripts are. I've enabled JavaScript in Acrobat Preferences, and there is a "JavaScript" section on the tools menu, but my scripts don't appear anywhere.

 

The two scripts I'd like to add are a "Reverse Order" script that reverses the page order, and a "flatten" tool that flattens all comments on the document.

 

Please help, and many thanks in advance.

 
Replies
  • Currently Being Moderated
    Aug 7, 2012 9:27 AM   in reply to AndrewL504

    I think yo're putting the Javascripts into the wrong folder. The Javascripts now go into Application Support, not inside the Acrobat app itself.

     

    Try this location:

    ~/Library/Application Support/Adobe/Acrobat/10.0/JavaScripts/

     

    As you also discovered, Acrobat 10 got rid of a bunch of main menus, so now any of your Javascript menu items are automatically added instead in the Tools -> Plug-in Add-on Tools twist-down menu.

     

    Hope this helps

    Darryl

     

    Message was edited by: D Zurn [update missplelling]

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 8, 2012 1:12 AM   in reply to AndrewL504

    I don't think you're looking in ~/Library/Application Support/Adobe. I think you're looking in /Library/Application Support/Adobe. ~ is a Unix thing meaning 'my home directory'.

     

    The idea is that these files are personal and don't require administrative privilege to install. Ordinary users can't necessarily change the Acrobat app or /Library.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 8, 2012 3:32 AM   in reply to AndrewL504

    As Test Screen Name pointed out, I meant to point out the folder in your user directory (~).

     

    You probably won't see the Plug-in Add-on Tools tab until there's something in there to show.

     

    Darryl

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 8, 2012 8:36 AM   in reply to AndrewL504

    One way to be sure that you have the corrct folder for the Javascripts is that Acrobat places two files in the Javascripts folder.

     

    You should see "glob.js" and/or "glob.settings.js" files in that folder. If at least one file is present, then you've got the right folder.

     

    Next, check that Javascript is enabled in the preferences: Acrobat -> Preferences -> Javascript, and make sure that the box for "Enable Acrobat JavaScript" is checked.

     

    You should be good to go. You might need to restart Acrobat for the prefs to take effect.

     

    Darryl

    Enable JavaScript.png

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points