Add Navigation Hyperlinks to Your Pages with this Free Script
Not all interactive features work inside an interactive PDF. One of the most notable (and most painful) omissions is that buttons work in some PDF readers and not in others. Buttons are a critical part of many interactive PDF files — especially page navigations buttons, such as “next page” and “previous page” — so this is a huge problem!
When it comes to page navigation, the best alternative to using a button is to use a hyperlink. Hyperlinks work reliably on all PDF readers I’ve seen. However, here there is also a problem: While it’s not difficult to use the Hyperlinks panel to set up hyperlinks on each page of your document, it is tedious and time-consuming — especially if you need one hyperlink to take you to the previous page, and one to take you to the next page.
Keith Gilbert and I were chatting about this problem recently, after The InDesign Conference, and decided an excellent solution would be a script… which he promptly wrote!
So I’m here today to announce Keith’s awesome (and free!) script, called “Add Page Buttons.jsxbin,” which you can find on his website here.
Running the Script
After you download and install the script, you have two choices for where you want it to create its hyperlinks:
If you simply run the script, it will add a new layer called “Page turn buttons” to your document, then add invisible frames (no fill/no stroke) in the lower page corners and create and apply page hyperlinks to each one. You can see the result below:
Alternatively, you can create your own layer called “Page turn buttons” (yes, it has to be named exactly that), add two objects to it on page 2, and then run the script. In this case, it will copy your objects to every page in your document and then apply the hyperlinks to them. This lets you design your own page navigation buttons, such as arrows.
Note that I said you have to add the objects on page 2. It won’t work otherwise. And note that the script won’t add the “previous page” button on the first page, or the “next page” button on the last page!
There are several ways to create page navigation hyperlinks. This script does it by building ‘Page’ links. That is, the “next page” link on page 2 points to page 3:
Of course, the primary concern here is if you add, move, or delete pages from the middle of your document. Fortunately, running the script again comes to the rescue: It removes all the buttons, creates new ones (based on the objects on page 2, of course) and re-builds the hyperlinks.
Big kudos to Keith for writing this script and releasing it to the world!