Setting action buttons

About buttons

Buttons are most commonly associated with forms, but you can add them to any document. Buttons can open a file, play a sound or movie clip, submit data to a web server, and much more. When deciding on how to initiate an action, remember that buttons offer the following capabilities that links and bookmarks do not:

  • A button can activate a single action or a series of actions.

  • A button can change appearance in response to mouse actions.

  • A button can be easily copied across many pages.

  • Mouse actions can activate different button actions. For example, Mouse Down (a click), Mouse Up (releasing after a click), Mouse Enter (moving the pointer over the button), and Mouse Exit (moving the pointer away from the button) can all start a different action for the same button.

    Buttons are an easy, intuitive way to let users initiate an action in PDF documents. Buttons can have a combination of labels and icons to lead users through a series of actions or events by changing as the mouse is moved. For example, you can create buttons with “Play,” “Pause,” and “Stop” labels and appropriate icons. Then you can set actions for these buttons to play, pause, and stop a movie clip. You can select any combination of mouse behaviors for a button and specify any combination of actions for a mouse behavior.

Add a button to an Acrobat PDF form

  1. Make sure you are in edit mode by selecting Tools > Forms > Edit, and then select Button from the Add New Field list. Your curser becomes a cross hair.
  2. On the page, click where you want to add the button to create a button with the default size. For a custom size button, drag a rectangle to define the size of the button.
  3. Double-click the button field, and then specify a name, tool tip text, and other common properties.
  4. Click the Appearance tab, and then specify options to determine the button appearance on the page. Remember, if you select a background color, you are not able to see through to any images behind the button. The text options affect the label you specify in the Options tab, not the button name in the General tab.
    Note: If Enable Right-To-Left Language Options is selected in the International panel of the Preferences dialog box, the Appearance tab includes options for changing the digit style and text direction for buttons.
  5. Click the Options tab, and select options to determine how labels and icons appear on the button.
  6. Click the Actions tab. Specify options to determine what happens when the button is clicked, such as jumping to a different page or playing a media clip.
  7. Click Close.
    If you’re creating a set of buttons, you can snap the object to grid lines or guides.

Add a submit button

When you distribute a form, Acrobat automatically checks the form. If it doesn’t find a submit button, it adds a Submit Form button to the document message bar. Users can click the Submit Form button to send completed forms back to you. If you don’t plan to use the Submit Form button created by Acrobat, you can add a custom submit button to your form.

  1. Using the Button tool, create a button. Double-click the button and set options in the General and Options tabs.
  2. In the Options tab, choose an option in the Layout menu for the button label, icon image, or both. Do one or both of the following:
    • Type text in the Label box to identify the button as a submit button.

    • Click Choose Icon and either type the path to an image file or click Browse and locate the image file you want to use.

  3. In the Actions tab, choose Submit A Form on the Select Action menu, and then click Add.
  4. In the Submit Form Selections dialog box, do one of the following:
    • To collect form data on a server, type the location in the Enter a URL for this link. For example, http://www.[domain]/[folder]/[subfolder]/ for an Internet address or \\[server]\[folder]\[subfolder]\ for a location on a local network.

    • To collect form data as attachments to email, type mailto: followed by the email address. For example, mailto:nobody@adobe.com.

  5. Select options for Export Format, Field Selection, and Date Options, and click OK.
Note: If the data returns in FDF or XFDF format, the server URL must end with the #FDF suffix—for example, http://myserver/cgi-bin/myscript#FDF.

Submit Form Selections options

The following options are available in the Submit Forms Selections dialog box:

Enter a URL for this link
Specifies the URL to collect the form data.

FDF
Returns the user input without sending back the underlying PDF file. You can select options to include Field Data, Comments, and Incremental Changes To The PDF.
Note: Selecting the option for incremental changes is useful for receiving digital signatures in a way that is easily read and reconstructed by a server.

HTML
Returns the form in Hypertext Markup Language.

XFDF
Returns the user input as an XML file. You can include Comments with the field data or just the field data.

PDF
Returns the entire PDF file with the user input.

Field Selection
Specifies what fields are returned. To receive only some of the completed field data, select Only These, click Select Fields, and select which fields to include or exclude in the Field Selection dialog box.

For example, you might use this to exclude some calculated or duplicate fields that appear in the form for the user’s benefit but which do not add new information.

Date Options
Standardizes the format for dates that the user enters.

Making buttons change appearance

A button can have a label, an icon, or both. You can change how the button appears in each mouse state (Up, Down, and Rollover). For example, you could create a button that has a “Home” label until the pointer is moved over the button, when it might have a “Click to return to home page” label.
View full size graphic
Button layouts
A.
Label only

B.
Icon only

C.
Icon top, label bottom

D.
Label top, icon bottom

E.
Icon left, label right

F.
Label left, icon right

G.
Label over icon

You can make button icons from any file format that Acrobat can display, including PDF, JPEG, GIF, and other image formats. For whichever format you select, the entire page is used, so if you want to use only a portion of a page as an icon, you need to crop the image or page before carrying out this procedure. The smallest allowable PDF page size is 1-by-1 inch (2.54-by-2.54 cm). If you want the icon to appear smaller than 1-by-1 inch, scale it to fit the size of the box drawn with the button tool. Clicking Advanced in the Options tab of the Button Properties dialog box lets you determine how a button icon is scaled to fit inside a button.

Edit a button

 Select the Button field, and then do any of the following:
  • To edit the properties for the button field, double-click the button.

  • To change the appearance of buttons, use the appearance options in the Appearance tab of the Button Properties dialog box.

  • To align, center, or distribute the button with other form fields, or to resize or duplicate the button, right-click the button, and then choose an option from the context menu.

Specify Acrobat button display properties

  1. Make sure you are in edit mode by selecting Tools > Forms > Edit, and then click the Select Object tool .
  2. Double-click an existing button, and then click the Options tab in the Button Properties dialog box.
  3. For Layout, choose the type of label display you want. (For information on scaling button icons, see the next procedure.)
  4. For Behavior, specify the display of the button when clicked.
  5. To define the label or icon that appears on the button, do the following:
    • If a label option is selected from the Layout menu, type the text in the Label box.

    • If an icon option is selected from the Layout menu, click Choose Icon, click Browse, and select the file. (Click Clear to remove the selected icon.)

Button Behavior options

None
Keeps the appearance of the button the same.

Push
Specifies appearances for the Up, Down, and Rollover states of the mouse. Select an option under State, and then specify a label or icon option:

Up
Determines what the button looks like when the mouse button isn’t clicked.

Down
Determines what the button looks like when the mouse is clicked on the button, but before it’s released.

Rollover
Determines what the button looks like when the pointer is held over the button.

Outline
Highlights the button border.

Invert
Reverses the dark and light shades of the button.

Scale and position buttons

  1. Make sure you are in edit mode by selecting Tools > Forms > Edit, and then click the Select Object tool .
  2. Double-click an existing button to open the Button Properties dialog box.
  3. Click the Options tab, select one of the icon options from the Layout menu, and then click Advanced.
    Note: The Advanced button isn’t available if you choose Label Only from the Layout menu.
  4. Select an option from the When To Scale menu:
    Always
    Scales the icon as defined regardless of its size in relation to the button size.

    Never
    Preserves the original size of the icon; the button border crops the icon if it doesn’t fit. If Never is selected, scale options aren’t available.

    Icon Is Too Big
    Scales the icon as defined only if it is larger than the button.

    Icon Is Too Small
    Scales the icon as defined only if it is smaller than the button.

  5. From the Scale menu, select whether to scale the icon proportionally. If the icon is scaled nonproportionally, it may be skewed.
  6. To make sure that either the top and bottom or left and right sides of the icon are flush against the button edges, select Fit To Bounds.
  7. To define where the icon is placed inside the button, drag the slider arrows. Icon placement is defined according to the percentage of space preserved between the icon and the left field boundary, and between the icon and the bottom field boundary. The default setting (50, 50) places the icon in the middle of a field. You can click Reset at any time to revert to the default placement setting.
  8. Click OK, and then click Close.

Hide an Acrobat button except during rollover

In some cases, you may want the button area to be invisible until the pointer moves over it. By alternately showing and hiding a button, you can create interesting visual effects in a document. For example, when you move a pointer over a city on a map, a detail map of the city could be displayed, and the detail map could disappear when the pointer moves away from the city.

Showing and hiding icons
A.
Pointer not over button area

B.
Pointer enters button area

C.
Pointer exits button area

  1. Using the Button tool , drag across the area where you want the pop-up button to appear. For example, if the PDF file contains a map of France, drag across the area where you want a detailed map of Paris to pop up.
  2. Double-click the button.
  3. Click the Options tab, and choose Icon Only from the Layout menu.
  4. Choose Push from the Behavior menu, and then choose Rollover from the State list.
  5. Click Choose Icon, and then click Browse. Select the file type from the File Of Type, navigate to the location of the image file, and then double-click the file. In this example, you would select a map of Paris. Click OK to accept the previewed image as the button.
  6. Click the Appearance tab. If needed, deselect Border Color and Fill Color, and then click Close.
  7. If you are in the edit mode, click Preview. The image field you defined appears as the pointer rolls over the button area and disappears when it exits.
    If you want the image to be larger than the rollover area, or if you want the image to be in a different location than the image button that pops up, use the Show/Hide A Field action. First, you specify an icon for the button that will be shown and hidden. Next, you create a second button that acts as a hot spot when the mouse rolls over it. You do not assign an icon for the appearance of the second button. Instead, you use the Actions tab to show the first button when the pointer enters the second button, and hide the first button when the pointer exits.