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!

Thursday, April 23, 2015

Saving (Your) As...

This is just a very important tip for anyone who works on various computer files. (Gee, would that be just about everyone?)

There are usually just two times when most people use the Save As... function found in most any application. Those times are when:

  1. they initially save their work, and 
  2. when they want to make a new file based off of the one they have and wish to save under a new file name. (I am aware that most database applications do not have a Save function. I forget whether FileMaker Pro has a Save As... function.)
Hitting simply Save (Command-S/Control-S) is so easy! Most Apple applications now set it differently. There is a Save command and a Duplicate command. The Duplicate command will actually spin off a new copy of your file into a new window, leaving the original intact. This answers the need for #2 above.

The Save command will function just like the old Save As... when condition #1 is being met. If you have just created a new document, and after starting to enter your information you choose Save, you will get the initial dialog for naming your file and determining where you will store it. For Apple and other OS X apps, you can get to Save As... by holding down the Option key as you click on the File menu.

All this is probably way too simple for your current experience on a computer, but I had to start here just in case you are fairly new to computers.

Many third party applications, especially those from Adobe and others related to graphics and production art, still retain the Save As... function in the File menu.

As I said above, the easy thing to do is always choose Save while working on your file. But did you know there are some reasons why it may be wise to choose Save As... occasionally?

When you initially save a file, the computer writes the file as a complete unit, with all the parameters of the document, settings for font, colors, margins, etc. and whatever data you had in the document itself. A nice, neat package.

Now, as you work and Save, the additional information you enter into your document gets written into your file, but not necessarily in the most efficient place. The new data gets written at the end of your file, and there the latest information gets written as you continue to Save your file. When you open your file again, the application looks at the file, finds the initial parameters of your document and writes that into memory, then as it finds new information at the end of the file, it reads it and places it into your document and into memory. So, even though this takes only extra milliseconds, it is not the fastest read of your file that you could have.

Not only that, but it may not be the safest way to keep your file. Let's say there is just one little glitch in saving your information the last time you chose Save. All your file information is there, but at the very end of your file, something gets corrupted or miswritten, and potentially you have introduced a problem in your file. It may open, but it may not behave as you expect at some certain point. Then again, it may not open at all.

When all you use is Save, another thing happens; your file gets larger. Naturally, your file will get larger as you add more information into your document. However, when you use Save over and over, and as you write all that data in chunks at the end of your file, it gets larger than it should. It can be 20% larger or more, depending on the type of file it is. This is because the file is being written so inefficiently.

The answer, of course, is to use the Save As... function every so often. When you choose Save As..., you will get the Save dialog, but you can ignore giving your file a different name, and keep it in the same location. When you click Save/OK, your computer will ask if you want to replace/overwrite the file saved in this location, which is, of course the one you have open right now. Go ahead, and the computer writes your file completely in one whole package, just like when you saved it the first time. This is also called a clean save.

In the examples below, you will see the info for one file saved several times by just choosing Save. Next to that is the same file after having chosen Save As..., or after a clean save. You will note right away the difference in file size.


file size using only Save (6.1 megabytes)So there you have the reasons to use Save As... more often than not. Keep up the good work!


file size after using Save As... (now 2.6 megabytes)