Friday, April 24, 2015

Adobe Acrobat: Buttons – Part 2

Finally, I continue to expound on what buttons can do in Adobe Acrobat Pro. Most of the functions I will cover are available in many versions of Adobe Acrobat prior to Pro. If you need a refresher on basic button functions, you should look up my first write up on buttons.

Of course, if you desire to follow along, then you will want to download the files I have prepared for this article.

So, this time we are going to begin making a set of buttons that will help us navigate a document without the use of windowed navigation features, such as the next and previous page buttons on the menu bar. This style of navigation buttons can be handy in some circumstances, such as a presentation-like document opened in full-screen mode, or without the window menus and such. (The current features of a navigation bar opening in a full-screen mode does already what we are going to do, but our exercise will help us gain insight in how buttons work anyway.)

So, begin by opening our main document, a small catalog of some dinosaurs.

our Dinosaur Catalog's initial page in an Acrobat Pro window

You will notice that I have also opened the Interactive Tool panel. This is our main access to the Button tool outside of the Forms panel.

Adobe Acrobat Pro's Interactive Objects' tools panel


Our first page is simply the title page, and will only be looked at initially. There is no need for a button here, but it will be nice to add an on-screen way to get to the next page, where we will build the set of buttons to use. To do this we will make a simple link.

So, first thing is to find the Link tool. It is in the Content Editing panel. Click on it and draw out a marquee surrounding the debossed area the title sits in. When it asks for what you want to do, leave it at “Go to a page view” and click OK. Navigate to the second page, where you can now click on the Set Link button in the floating dialog to set the link.

a screen shot of our Dinosaur catalog's initial page after drawing out the link marquee

the dialog box telling an Acrobat user to navigate to a page an set the Link



You may now go to the second page and select the Button tool. Along the bottom of the page, click and drag out a small area about 1-1/2 inches wide and under an inch high. You will notice the New Button dialog shows up. Click on its link to open the Properties dialog.

a drawn button marquee and its resulting Field Name flag
When it comes up, set the name of this button to “Previous_Page” and fill in the Tooltip to something  that tells the user to go to the previous page. Notice that the Common Properties on the bottom of this panel are for this form field to be Visible. That’s what we want at this time. If we had it Hidden, then the user would not be able to interact with it. One reason for using the Hidden setting will be given at a future installment yet.

Adobe Acrobat Pro button properties dialog General tab options

So next we progress to the Appearance tab. Here we simply want to set the background and border to None. We can ignore the Text settings, since we will not place any text in this button.

Adobe Acrobat Pro button properties dialog appearance tab options

We will ignore the Position tab, which is only found from Adobe Acrobat Pro XI and beyond, and move to the Options tab. Here’s where we begin to have some fun! We are going to use an icon for the appearance of the button. An icon is simply a graphic we create in some other application, such as Adobe Illustrator, to make the button look differently from what you can get from within Adobe Acrobat’s options (which aren’t much).

As long as you can export your graphic out to either a PDF, PNG or similar file format, then you should be able to use it in your PDF document. I wouldn’t recommend a JPEG file, because if you have a rounded corner or any non-rectangular shape, you will get a solid white background in your non-image areas. Luckily for this exercise, I have some buttons pre-made for us.

Adobe Acrobat Pro’s button properties'  dialog in the Options tab

So, drop down the Layout menu and choose Icon only from the list of options. Choose Invert for the Behavior for now. You will notice that so far there is only an “up” state for this button. Next, click on the Choose Icon button. Navigate to where you have the Buttons folder of these project files, and select the file called “left_arrow_wshadow_ylw-up.pdf” and click through the OKs. When you get back to the Button Properties dialog, you should see a yellow arrow graphic pointing left within your button marquee.

our first view of the previous page button

Next, click on the Advanced... button to get into the Icon Placement dialog. This feature controls the way your icon will look within the button field area. You have options for when to scale your icon, and for aligning your icon relative to the sides or center of the button field. For this button, choose Never for the scale, and we will keep the position centered within the button field.

the icon Placement dialog found after choosing the Advanced button


Now we have to add the all-important action. Click on the Actions tab, select Mouse Up as the trigger and Execute a menu item as the action. Click on Add... to find a listing of menu items. Here you see items that are in common with Adobe Acrobat Pro and Adobe Reader. It is up to 3rd party PDF software developers to allow these commands to be in common with their packages. Select “View > Page Navigation >  Previous Page” as your action.

a list of available menu commands in Adobe Acrobat



By the way, the field box properties dialog is pretty versatile in one way: it can remain open as long as you have the Button tool selected. You don’t have to close it when going from one button or form field to the next, just click on the next field you wish to modify and it will reflect the options of that selected field.

However, at this time we want to close the field properties dialog, because we want to test this button to see if and how it works! So click on Close and then choose the Hand tool in Acrobat’s toolbar. Click on your new button and your document should go to the previous page, the first page in this case. Congratulations! Now we can go back to the next page.

Now that you have one button, it isn’t hard to make another one! Choose the Select Object tool in the Interactive Objects pane and click on the Previous Page button field. Hold down the Option/Alt and Shift keys and drag it to the right. This should make a copy of this button field. Double-click on it to open the properties dialog.

a duplicate of the previous page button


Now, we can change the particulars of this button so it becomes the Next Page button. The reason for working from a copy of the other button is that many other aspects of it, such as the size of the box, the background, how we scale/size the icon graphic and so forth, are already established. We should only need to change a few things.

Go to the General tab and change the field name and tip to say Next page.

Go to the Options tab and click on Choose Icon... and navigate to the button graphic “right_arrow_wshadw_ylw-up.pdf” to select it as the icon for this button.

Then go to the Actions tab and select the Execute a menu item action. You will see an Edit button become available, which, of course, you should click on to bring up the list of menu commands to use.  Select “View > Page Navigation >  Next Page” as your action.

select the action to edit it while in the Properties dialog
Select the specific action to edit it.

Finally, we will copy one of these buttons to make a Home button, so you can go back to this intro page. Like before, select one of these buttons with the Option/Alt and Shift keys held down as you drag it over to the center of the group of buttons.

Double-click on it to bring up the Properties dialog and change the Name and Tip fields to Home.

Go to the Options tab and load in the next icon file, “home_button_ylw-up.pdf.” Resize the box to show the entire icon. Don’t worry about the position of the box just now.

In the Actions tab, delete the current action and drop down the Select Action menu to choose the Go to a page view option. When you click on the Add... button, the Set Link box will come up. Simply click Set Link to make the current page the destination.

Boy! We've done a lot here, but before we finish for this lesson (and leave you hanging for a while), we will do a little housekeeping on these buttons.

Use the Select Object tool to draw a marquee surrounding all three buttons. Then right-click on one of them to bring up a context-sensitve menu. As far as I know, this is the only access available for some of the functions you find on this menu. Find the Align, Distribute or Center menu and wait for the fly-out menu of options to show. Scroll over to the Distribute Horizontally to even the buttons out. Then choose that Align, Distribute or Center menu once more and find Align Horizontally to line them up on their vertical centers.

access to the Align, Distribute and Center menu options

There you have it, a set of navigation buttons to use in this wonderful PDF document. And now you can pride yourself in learning something more that Adobe Acrobat Pro can do with buttons.

Say again? We have to get these on the other pages? Oh. Well, we will have to take care of that in the next episode, as we have some other work to accomplish before that happens. Sorry to leave you hanging like that. See you back soon!

No comments:

Post a Comment