1 person found this helpful
Try adding the button using the information here: http://acrobatninja.blogspot.com/2011/03/enterprise-toolbar-customization-in.html
Although Reader doesn't have a visible Quick Tools toolbar, it does have one. Scroll down to the bottom of that article for Reader-specific information. I haven't tried this, but you can.
1 person found this helpful
The app.addToolButton() method for Acrobat 9 and earlier uses the cName parameter to define the internal name of the tool and posts it to a special "Add-on" toolbar, for example:
cExec: "app.alert('Someone pressed me!')",
cTooltext: "Push Me!",
cLabel: "My Button",
In Acrobat X this function will create a new pane in the Tools Panel called "Plug-in Add-on Tools" if it's not already present, and post the button there rather than on the system toolbar or Quick Tools area; but the internal name of the resulting button used by the registry preferences will have the prefix "_legacy:". In this example, if you create a button using the above script and are referring to the button in the Acrobat X registry keys to pre-populate the button into the Quick Tools area, you should use the name
However the button itself still has the internal name "myToolButton", so if you try to create it a second time, the script will fail because the name "myToolButton" is no longer unique. Don't use the "_legacy:" prefix in your button-creation script.
Note that in Acrobat X 10.0 you cannot use the app.removeToolButton() method to remove any buttons from anywhere (the toolbars or the Panes), nor can you use the app.listToolbarButtons() function to return an array of all the objects; as the API has no direct connection to the toolbars or Panes. When a script tries to create a new button the Acrobat X API diverts the function call to the Tools Pane, but it's strictly a one-way conversation.
Thanks for posting this. It would make a good follow-up blog post.
Yeah I will, thanks - just investigating why something in the API isn't working properly first... Pandora's Box time!
Thank you very much for your valuable assistance.
I have used your example as a trial to add the tool button to the system toolbar in Adobe Reader X except the button is not showing.
In the registry editor under AVGeneral tried in both cCommonToolsDesktop and cFavouritesCommandsDesktop, I have added a new string value as follows:
Name _legacy:myToolButton Type REG_SZ Data _legacy:myToolButton
Also tried ..........
Name _legacy:myToolButton Type REG_SZ Data myToolButton
I am not sure what the Data value should be called? Is this where I could be going wrong?
Look forward to your reply.
Thank you once again.
The name of the string value should be "a0", or "a1", etc. So to summarize, under the following registry key:
Add the following string value:
assuming the cName of the button you added is "myToolButton".
Thank you so much for your reply George.
I have been able to successfully add the custom tool buttons to the cFavouritesCommandsDesktop as follows:
Name: a0 Type: REG_SZ DataValue: _legacy:myToolButton
Name: a1 Type: REG_SZ DataValue: _legacy:Checked
Name: a2 Type: REG_SZ DataValue: _legacy:Designed
Name: a3 Type: REG_SZ DataValue: _legacy:Approved
Name: a4 Type: REG_SZ DataValue: _legacy:DesignApproved
I am most grateful for all your help, there is no way I could have figured this one out by myself.