I'm trying to execute the PDF Optimizer menu item from a tool bar button and am having a hard time following example in the JS reference. Could someone explain the correct syntax of how to get PDF Optimizer to execute?
Here is some code I got from the JS refrence which I modified.
myTrustedMenu = app.trustedFunction( function( name )
{
app.beginPriv();
app.execMenuItem(PDFOptimizer);
app.endPriv();
});
Or can I even get to this in Acrobat 8 with all the stuff locked down because of security reasons?
Have you created a list of menu items as suggested in the JS Api so you know the cUser name that will be used in JavaScript?
If the parameter in your "app.execMenuItem()" method call is the name of the menu item it has to be a quoted string or you must set the value of the variable PDFOtimizer.
In versilon 5, this menu item has a cUser value of "SpaceReduction".
George Kaiser