41
198
USING ACROBAT X PRO
Forms
Last updated 10/11/2011
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.
44
199
USING ACROBAT X PRO
Forms
Last updated 10/11/2011
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.
C# Word - Convert Word to HTML in C#.NET VB.NET How-to, VB.NET PDF, VB.NET Word, VB toolkit SDK, preserves all the original anchors, links, bookmarks and font C#: Convert Word document to HTML5 files.
how to create bookmarks in pdf file; editing bookmarks in pdf
58
200
USING ACROBAT X PRO
Forms
Last updated 10/11/2011
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.
More Help topics
“Scale and position buttons” on page 201
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.
C
A
B
E
D
F
G
Kahili
Kahili
Kahili
Kahili
Kahili
Kahili
Kahili
Kahili
49
201
USING ACROBAT X PRO
Forms
Last updated 10/11/2011
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.
A
B
C
40
202
USING ACROBAT X PRO
Forms
Last updated 10/11/2011
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.
Publishing interactive web forms
About web forms
PDF forms can be useful for submitting and collecting information over the web. This is done by providing several
button actions that perform functions similar to some HTML scripting macros. You must have a Common Gateway
Interface (CGI) application on the web server to collect and route the data to a database. Any existing CGI application
that collects data from forms (in HTML, FDF, or XML format) can be used.
Before you make your forms web-ready, make sure that your form-field names match those set in the CGI application.
Important: CGI scripts must be built outside Acrobat, and their creation is not covered by the Adobe Acrobat product.
Add submit functionality
Use the Submit A Form action to send form data to an email address or to a web server by specifying a URL. You can
also use the submit button to send other files back to a server or database. For example, you can attach scanned images
or files to a form. The files are submitted along with the rest of the form data when you click the Submit button.
If your PDF form contains an email-based submit button, you can use the Distribute workflow to facilitate
distributing the form to others.
1 Select Tools > Forms > Edit, then select Button from the Add New Field list, and create a button.
2 Double-click the button to open the Button Properties dialog box.
3 Click the Actions tab, and select Mouse Up from the Select Trigger menu.
4 Select Submit A Form from the Select Action menu, and then click Add.
5 In the Submit Form Selections dialog box, type an entry in Enter A URL For This Link:
• To send the form data to a web server, enter the destination URL.
• To send the form data to an email address, enter mailto: followed by the email address. For example, type
mailto:nobody@adobe.com.
6 Make additional changes to the available options, and then click OK to close the dialog box.
7 Change settings on other tabs in the Button Properties dialog box as needed, and then click Close.
42
203
USING ACROBAT X PRO
Forms
Last updated 10/11/2011
Submit Form Selections options
FDF
Exports as an FDF file. You can select one or more of the available options: user-entered data, comments, and
incremental changes to the PDF file. The Incremental Changes To The PDF option is useful for exporting a digital
signature in a way a server can easily read and reconstruct.
Note: If the server returns data to the user in FDF or XFDF format, the server’s URL must end with the #FDF suffix—for
example, http://myserver/cgi-bin/myscript#FDF.
HTML
Exports as an HTML file.
XFDF
Exports as an XML file. You can choose to export the form fields data, comments, or both.
PDF The Complete Document
Exports the entire PDF file that is your form. Although this creates a larger file than the
FDF option, it is useful for preserving digital signatures.
Note: If the users that fill in the PDF form are using Adobe Reader, you must choose either FDF or XFDF for the Export
Format option.
All Fields
Exports all form fields even if the form fields do not contain values.
Only These
Exports only the form fields you specify by clicking Select Fields and indicating which form fields to
include and whether you want to include empty fields.
Convert Date To Standard Format Exports all form dates in a single format, regardless of how they are entered in the form.
Add a Reset Form button
A Reset Form button clears any data a user has already entered in the form. It is like the Tools > Forms > Clear Form
feature, which is available to you when you create and edit Acrobat forms. However, you can set up your reset button
so that it clears only specific fields.
1 Select Tools > Forms > Edit, then select the Button tool from the Add New Field list, and create a button.
2 Double-click the button to open the Button Properties dialog box.
3 Click the Actions tab, and select Mouse Up from the Select Trigger menu.
4 Select Reset A Form from the Select Action menu, and then click Add.
5 In the Reset A Form dialog box, do one of the following and then click OK:
• Click individual check boxes to select or deselect the fields that you want to be reset by the button.
• Select All.
The list in the Actions tab now shows Reset A Form nested under the Mouse Up action.
As needed, you can open other tabs in the Button Properties dialog box and apply other types of properties to the
button.
More Help topics
“Form fields behavior” on page 188
36
204
USING ACROBAT X PRO
Forms
Last updated 10/11/2011
Add an Import Data button
Use the Import Form Data action to enable users to fill out common form fields, such as name and email address, with
data imported from another form. Users can also use the Import Data button to populate common form fields with
their personal profile information. Only form fields that match are updated. The fields that do not match are ignored.
Before you create an Import Form Data action, set up a form with common information form fields from which to
export the data.
Note: The Import Form Data action searches for the data file from which to import data in different locations in Windows
than on Mac OS. In Windows, the Import Form Data action searches the Acrobat or Adobe Reader folder, the current
folder, the System folder, the Windows folder, My Documents\Adobe\Acrobat, and the folders that are in the PATH
statement. On Mac OS, the Import Form Data action searches the Acrobat or Adobe Reader folder and the System
Preferences folder.
1 Select Tools > Forms > Edit, then select Button from the Add New Field list, and create a button.
2 Double-click the button to open the Button Properties dialog box.
3 Click the Actions tab, and select Mouse Up from the Select Trigger menu.
4 Select Import Form Data from the Select Action menu, and then click Add.
5 Locate and select an FDF file, and click Open.
6 Click another tab in the Button Properties dialog box to continue defining properties for the button, or click Close.
More Help topics
“Manage form data files” on page 207
“Add a button to an Acrobat PDF form” on page 198
CGI export values
An export value is the information sent to a CGI application to identify a user-selected form field. You need to define
an export value only if both of the following are true:
• The data is collected electronically in a database over a company intranet or the web.
• The data is different from the item designated by the form field, or the form field is a radio button.
When defining export values, keep the following guidelines in mind:
• Use the default export value (Yes) to indicate that a check box or radio button has been selected.
• Enter an export value for dropdown lists boxes or list boxes only if you want the value to be different from the item
listed—for example, to match the name of the form field in a database. The item selected in the dropdown list box
or list box is used as the export value unless a different export value is explicitly entered in the Properties dialog box.
• Related radio buttons must have exactly the same form field name but different export values. This ensures that the
radio buttons toggle and that the correct values will be collected in the database.
Documents you may be interested
Documents you may be interested