These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Hide tools and Mouse UP action

samsung
Registered: Feb 12 2008
Posts: 5

Hello,

1- I do not want to enable a security password to my document. I know that we can use, for example, the following code for hiding the Hand tool :

app.hideToolbarButton("hand");

So, can anyone help me with the JavaScript to programatically hide the Menu Bar Button and the Advanced Editing (like the Select Object Tool, for instance) in any user machine ?

2- I want the right code so as to accomplish the following when the person opens my PDF :

If (mouse up button1) or
(mouse up button2) or
(mouse up button3)

do something ...

else if (mouse up button 4) or
(mouse up button 5) or
(mouse up button 6)

do another thing ...

So, how can I do that in JavaScript ?

Thanks,
Maleck

My Product Information:
Acrobat Pro 7.0.9, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
For the "Hand" hide, the example in the JS API Reference:

A file named, myConfig.js, containing the following script is placed in one of the Folder Level JavaScripts folders.

app.hideToolbarButton("Hand");

When the Acrobat viewer is started, the "Hand" icon does not appear.

This script can only be executed in the JavaScript Debugging Console or in the application JavaScript folder. Executing the script in the console will require restarting Acrobat/Reader to get the hand back. Placing the code in the application folder will hide the "Hand" until the code is removed from the application folder and Acrobat/Reader is restarted. Basically the user will never have the "Hand", So be very very sure you want to always have the "hand" removed from Acrobat/Reader!!!

Button use is detected by each individual button and the action of the mouse or the focus on the button field. You can associate an action with MouseUp, MouseDown, MouseEnter, MouseExit, OnFocus, or OnBlur. If the "Push" highlight option is selected for the button will allow the face of the button to change for the button up, down, and rollover.

You might want to look at provided with the Acrobat application and other working forms to see how others code JS into PDF forms.

Documentation available from Adobe:

Acrobat SDK; http://www.adobe.com/devnet/acrobat/
Acrobat JavaScript Documentation: http://www.adobe.com/devnet/acrobat/javascript.php
Acrobat FDF Toolkit: http://www.adobe.com/devnet/acrobat/fdftoolkit.php
PDF Reference: http://www.adobe.com/devnet/pdf/pdf_reference.php

The above sites include additional links to other PDF information.

Books:
Adobe Acrobat Bible series by Ted Padova
Adobe Acrobat Tips and Tricks by Donna L. Baker
Extending Acrobat Forms with JavaScirpt by John Deubert
Creating Dynamic Forms with Adobe LiveCycle Designer by J. P. Terry

Adobe Sponsored forums:
Acrobat User-to-User forums: http://www.adobeforums.com/cgi-bin/webx/.3bbeda8b/
Acrobat User Community: http://www.acrobatusers.com/

Other Forums:
Planet PDF Forums: http://forum.planetpdf.com/wb/default.asp

Other PDF Sites:
Planet PDF: http://www.planetpdf.com/
Windjack Solutions: http://www.windjack.com/
Ted's Homepage: http://www.west.net/~ted
Abracadabra PDF: http://www.abracadabrapdf.net/index.php?lng=en
NitroPDF: http://www.nitropdf.com/index.asp
D. P. Story (Acrotex): http://www.acrotex.net.
PDF Zone: http://www.pdfzone.com/

JavaScirpt:
JavaScript Central: http://devedge-temp.mozilla.org/central/javascript/index_en.php

George Kaiser