Monday, July 7, 2014

Adobe Acrobat X: Buttons - Part 1

A lack of PDF buttons

There is scarcely any aspect of Adobe Acrobat dealt with leaner than the idea of using buttons in a PDF document. If you do a web search for this topic, you will find very few articles, and most of them involve using JavaScript with the button actions, or they actually use LiveCycle Designer, which I don't get to use, because I am on a Macintosh. (Hey, LiveCycle Designer programmers, why don't you port that over to the Mac?)

So, I of course, aim to remedy this lack of information on Acrobat buttons and all the wonderful things you can accomplish with them.

For now it should be enough just to create a button and show how to get it to do something. Later we will try more and advanced stuff.

What you can do is follow along, if you download the sample working file(s) I have made available here. Otherwise, you are invited to create your own project as we go along.

Simple Button Creation

I will open a simple document of a few pages, with an indicator of the page number on each page. Nothing fancy.

our basic document for this demonstration


Another thing; I am using Adobe Acrobat Pro XI, so the placement of tools and items within your version of Adobe Acrobat may be different.

So, first step: find and choose the button tool. In Adobe Acrobat Pro XI it is found in the Interactive Objects tools pane. If you don’t see Interactive Objects, then go to the menu View > Tools > Interactive Objects. (Previous versions of Adobe Acrobat Pro may have the Button tool in the Content toolbox or elsewhere.)

Adobe Acrobat Pro XI's Interactive Object panel

Next, draw out a box about 1 inch wide and 1/2 inch high with the Button tool. You notice a pop up will show immediately with a field name of “Button1” and little else, except one text line in the bottom right corner saying “All Properties.” For now don’t click that.
the initial draw of the button tool

Of course, you’ll notice that the button is a field, for it says Field Name. Buttons are part of the whole form fields package that Adobe Acrobat Pro makes available. Because of this, a button has many uses  you may not even imagine yet. However, there are a couple of particulars you need to keep in mind because of this.

Number 1: as a field, each button should have a unique name given it. If any number of fields in a PDF file have the same name, the function of the PDF may get messed up, since the same data or function acted upon one field with that name, will be attached to the other fields with that name. The only exception would be the Radio Button form field, which we cannot spend time on right now.

A button field, though it doesn’t act like any other part of a form, will be recognized as a form element, and so the PDF file with only one button will be recognized as a form and may open with a menu bar for working with forms.

OK, back to our button. Now it’s time to click the All Properties link at the bottom of the big label box. This will open the Properties dialog. (If you have already clicked anywhere else in your document, you may have noticed the label box went away. That’s OK, you can get to the All Properties dialog by double-clicking on the button.)

a button with it's associated Properties dialog box

You see that the name of the button is selected here. Let’s rename it to say “Page2.” Hit your Tab key to move into the Tooltip field and type in “Goes to page 2.” The Tooltip gives the user a clue what the button (or any field) is for by showing your tip as the cursor hovers over the button. The Tooltip also acts as Alt Text for interactivity and compliance.

Next, select the Appearance tab to see the options there. You notice the fill color is currently a light gray (the default). Click on the little gray swatch next to the Fill Color label and choose something like a pure magenta. Depending on your operating system, you may have differing available color pickers.

The Text section sets your style of text in the label of the button, which is the text that shows up inside your button; this is only an option of course, you don’t have to have any text if you wish to keep your users guessing, or if prefer to use a graphic for your button otherwise (more on that some future time).

One quick note about the Font you choose. You will see a few fonts in the very top of your font list, with a line dividing these from your usual fonts list. These are the lowest common denominator fonts, meaning that everyone who opens your PDF file should have those fonts. It is best not to use fonts from below that line UNLESS you can guarantee every user of your PDF file will have those fonts available on their operating system.

Now choose the Options tab and observe the many possible settings you have available. For now just place your cursor in the Label area and type “To page 2.” When you hit the Tab key you should see your text appear in the button.

Acrobat button with Options tab properties

Now we have a button that is presentable to the user, except for one thing; we have to make the button do something! So, choose the Actions tab next. You may observe the straightforward options presented here. You have a Trigger to choose, and the drop-down list is filled with six possibilities. We will get to explain these in further excursions into Acrobat buttons, but for now, just leave it at Mouse Up.

the button properties Action tab Select Trigger menu dropdown

Suffice it to say that the Mouse Up option is the default behavior for just about any button in a computer application or web page. The action is triggered when you release the mouse button from the button, rather than on the click down. This allows a user the option to think twice about triggering the action, and to move the cursor away from the button before releasing it to avoid the action.

the button properties Action tab Select Action menu dropdown

So, now we get to say what we want to have happen. Drop down the menu for Select Action to see all the possible types of actions available. There are quite a number of choices, but for now scroll down a few to, “Go to a page view,” then click on Add....

You will see a little window come up with the instructions for creating a link. Navigate to page 2 of this PDF file and then click on “Set Link.”

Create link window


Now you may close the Properties box and select the hand tool. Click on your new button and watch it move to page 2 of the PDF file.

Congratulations! You now have a fully functioning button!

Tuesday, June 3, 2014

Adobe Acrobat Learning

If you have been around in the graphics world for a little while, I would be surprised if you have not heard about Adobe Acrobat and how it is used for PDF file creation and editing. Adobe has certainly had great success with this file format, and Acrobat is undoubtedly the most capable of PDF file editing and optimizing applications available.

True, there are many other PDF-editing applications, some smaller in scope, and others that way out-perform Acrobat. However, Acrobat is what I use in and outside of work. I have used Acrobat since it was first released in 1993, and I have never encountered another file format or application that comes close to it's usefulness for sending files to others for work evaluation or information sharing.

By the way, what was that file format that Microsoft was going to launch as its own kind of “portable document” file? Did it fall flat on its face?

When Acrobat first came out, there was one other file format some company had begun to bring out. I remember it was called Common Ground, and it may have first started on the Unix platform, on Sun workstations. However, it never amounted to anything. Acrobat came on the scene and dominated almost immediately. The only problem with it at first was that QuarkXPress stubbornly refused to support the PDF file format. That later proved to be a contributing factor to QuarkXPress’ downfall from its lofty perch.

Anyway, I think it is high time I should concentrate on sharing some of the most important things I have learned while using Adobe Acrobat over the years. Over the next few weeks or months I will share out of my “vast depth” of experience, and hopefully some of these pointers will be useful to you.