Last week I talked about creating navigation buttons to move forward and backward in a PDF document. Once you create the navigation buttons, the next step is setting up the document for viewing. There’s no need to add buttons to documents that open in default views. However, if you want to provide more viewing area for PDF pages, you can hide the toolbars or open documents in full-screen views.
Let’s look at hiding the Toolbar Well. Follow these steps to hide toolbars when a document opens in an Acrobat viewer:
app.toolbar = false;
This document-level JavaScript executes when the PDF file opens. The simple, one-line script hides the toolbars and, by extension, hides the Toolbar Well.
One problem users may have is that once the toolbars are hidden, they remain hidden in the current Acrobat session. If a user opens your file where the Document JavaScript hides the toolbars, closes your file and then wants to browse other PDFs, no toolbars are in view. A user can always press F8 to show toolbars, but not every user will know this.
As a courtesy to users viewing your PDFs, be sure to show the toolbars when your file closes. You can easily do this by adding a JavaScript to a Document Action. Here’s how:
app.toolbar = true;
The Document Action used here is Document Will Close. The JavaScript added to this action is invoked when the document closes, meaning in this case that the toolbars will be shown and return to the default view.
When you open a document in full-screen mode, all toolbars, navigation panels and menus are hidden. This view provides the maximum amount of screen area for viewing PDF pages. To navigate pages using Acrobat tools, each user has the option of adding a navigation toolbar when in full-screen mode to facilitate page navigation. Look at the Full Screen Preferences and note the checkbox for Show Navigation toolbar. When the box is checked, a toolbar appears where a user can easily move back and forth between pages by clicking the tools.
When it comes to user preferences, all users who view your files may have preferences set differently. Therefore, you can’t rely on something like the navigation tools for full-screen viewing to be visible on all computers where your files may be viewed. Creating navigation buttons alleviates the problem where there may be disparity in viewing preferences.
When a file is opened in full-screen mode, by default, a Hand cursor appears. Click the Hand tool and the view moves one page forward. To move backward, press the Shift key and press the Hand tool. If the Hand tool happens to be over a body of text, the cursor changes to an I-beam. Press Shift to move backward when the I-beam is in view and you’ll select text. In short, the default navigation using the hand tool in full-screen mode is clumsy and can be frustrating to novice users. A better solution is to create your own navigation buttons and disable the Hand tool so a user doesn’t inadvertently click and move forward in the document or select a body of text.
To disable the Hand tool in full-screen mode, create a Document Level JavaScript by following these steps:
app.fs.clickAdvances = false;
The next step is to set the initial view to open in full-screen mode. Press Ctrl + D (Windows) or Command + D (Macintosh) and the Document Properties dialog box opens. Click the Initial View tab and check the box where you see Open in Full Screen mode, as shown in Figure 4.
Click OK in the Document Properties dialog box and save your file. The file will now open in full-screen mode with the Hand cursor hidden. Don’t worry about turning the Hand cursor back on. Another file you open in full-screen mode will return to defaults unless you add a similar JavaScript.
Read more Acrobat 8 tips from Ted Padova in the "Adobe Acrobat 8 PDF Bible," available from Amazon.
Try Acrobat DC
Get started >
Learn how to
edit PDF.
Post, discuss and be part of the Acrobat community.
Join now >
0 comments
Comments for this tutorial are now closed.
Comments for this tutorial are now closed.