|Language:||English, Spanish, Dutch|
|ePub File Size:||19.39 MB|
|PDF File Size:||18.73 MB|
|Distribution:||Free* [*Regsitration Required]|
Do one of the following:. Using the Hand tool, right-click the bookmark, and choose Properties. Click the Actions tab. Add actions to page thumbnails. Click the Page Thumbnails button on the left. Choose an action from the Select Action menu, and click Add. Action types. You can assign the following actions to links, bookmarks, pages, media clips, and form fields: Execute A Menu Item.
Executes a specified menu command as the action. Go To A Page View. Import Form Data. Brings in form data from another file, and places it in the active form. Open A File. Open A Web Link. Play A Sound. Read An Article. Follows an article thread in the active document or in another PDF document. Reset A Form.
Page Exit media clips only. When a user leaves the page that contains the media clip. Mouse Down. Mouse Enter. When the pointer enters the field or play area. Mouse Exit. When the pointer exits the field or play area. However, these are still the settings used by the Console Window. If you want to change them you'll need to temporarily enable the Acrobat editor to modify the settings, then reselect the external editor.
In order for the settings to take affect you'll need to close and reopen the Console Window. After these preferences have been set Figure 1 , you're ready to start using the Console Window. The shortcut key can be a bit tricky on the Macintosh because there are slight differences between the keyboards on laptop and desktop systems.
So the keyboard shortcut is not always valid, but the tool button will always work. The tool panels are a new feature introduced in Acrobat X, so displaying the Console in earlier versions is slightly different.
The Shortcut key is the same, but instead of a tool button, these earlier versions use a menu item. The Console Window section of the Debugger is in the bottom portion of the dialog, in the area labeled View. In Figure 3, the View pull-down selection list is set to Console, meaning the Console Window is being shown. This area is also used to show the Script window for displaying runtime code when the debugger tools are enabled. In the figure, the Console is being shown immediately after Acrobat was started.
Either of the two following actions will cause Acrobat to run the code.
Acrobat always attempts to convert the result of an execution into text so that it can be displayed.
Instead, as shown in Figure 5 , it displays the word "Infinity. It is much easier to find this kind of issue by executing individual lines in the Console Window where you can see the results immediately, than it is to debug it from a field-calculation script.
The next line of example code is something that might be used in a real script.
It assigns a simple addition to a variable named 'sum'. As shown in Figure 6, the return value from this line of code is "undefined. The calculation is executed and applied to the declared variable, sum. However, the first and primary operation on the line is the variable declaration, so this is the operation that returns a value to the Console Window. Unfortunately, variable declarations do not return a value. To overcome this small issue, the Console widow displays "undefined.
So far we've talked about executing code in the Console Window for testing and debugging, but there is no reason to restrict our usage to this limited theme.
Assuming the current document has a field with the correct name on it, the following code displays the raw color value in the Console Window:. The result of this operation is a color array. Remember, Acrobat attempts to convert all results into text. Arrays are converted to text by converting each individual array element into a text string, so the result would look something like the following line when it is displayed in the Console Window.
We can easily copy and paste this information to accomplish some other purpose, for example applying the color to another field with this line of code:. Suppose a document needs to be checked for branding purposes, i.
The following code uses a simple loop to display this color info in the Console Window for manual inspection:. Because of the loop, this code cannot be executed one line at a time. It has to be done all at once. Notice that in the loop there is a function called console. It's in the fourth line. This function writes text to the Console Window and it will be discussed in the next section.
Here's an example of a function that does not have an easy equivalent on the regular Acrobat menus and toolbars. Enter the following line into the Console Window and run it:. Acrobat will create a new, blank PDF document. This is perfect for trying out new ideas before applying them to a working document. The results of this operation are shown in Figure 7 below. Note that yet again, the result is something different. The result shown in Figure 7 tells us the type of object created.
This result is only useful in letting us know the function worked. If app. Both of these situations would have been displayed in the Console Window. The path property is exactly what you might think it should be. It's the folder path of the current document. Since the current document was just created with app. The result will look something like this:. Of course, this information is easily available in the Document Properties dialog. The advantage to using the Console Window is to make this information available to copy to the system clipboard for use with another script in Acrobat or for something else.