X

Preview Tip: Making a linked Table of Contents

Preview is an excellent utility for viewing and making small edits and adjustments to pictures and PDF documents. While for the most part the program is used for its basic viewing features, some of the ways it handles PDF documents can be quite useful. One of these is the ability to easily add links to PDF pages, which can be used to create clickable indexes and tables of contents.

Topher Kessler MacFixIt Editor
Topher, an avid Mac user for the past 15 years, has been a contributing author to MacFixIt since the spring of 2008. One of his passions is troubleshooting Mac problems and making the best use of Macs and Apple hardware at home and in the workplace.
Topher Kessler
3 min read

Preview is an excellent utility for viewing and making small edits and adjustments to pictures and PDF documents. While for the most part the program is used for its basic viewing features, some of the ways it handles PDF documents can be quite useful. One of these is the ability to easily add links to PDF pages, which can be used to create clickable indexes and tables of contents.

We can turn this text into a link using the link annotation (click for larger view).

For example, lets take a simple PDF document and set it up to have links in the table of contents. In the following image, the PDF document has a table of contents, and the text is selectable; however, if you click the text it will not do anything. Adding a link here will allow us to set a destination page for this text so we can click it and go to the corresponding page in the document.

Creating a link

To do this, with the text selected you can activate the annotations toolbar by clicking the "Annotate" button in Preview's menu bar. Then choose the link annotation tool (looks like a small chain) and the text selection should be covered with a link box.

This is an invisible box that covers the text and will serve as the link when clicked. You can use the resizing dots to change the area of the link, or click and drag it around to move it so it covers the desired areas of the document. When you have the link in the desired location, you can set the destination of the link.

The inspector is where you set the link destination. You can also set a link to an external URL (Click for larger view).

Setting the link

When you first activate the link, you should see the document inspector appear. This is where you can view information about the document, as well as set specific attributes for the various annotations in Preview. If the inspector does not appear, you can press command-I to get to it.

With the inspector open, select the link and see that by default it is set to "Go to page 1." This can be changed to different pages by scrolling to the desired page (notice the destination page number will change) and then click the "Set Destination" button.

You can now select additional text, click the link annotation, and set the destination page by scrolling and clicking the "Set Destination" button for all desired links in the document.

The link manager (seen by clicking the circled "annotations" button) allows you to easily manage multiple links in the document (click for larger view).

With the destination now set, close the inspector and click the Annotate toolbar button again to hide the toolbar. Then move your mouse over the text and you should see it turn into a pointing finger, indicating a link is present. Click the link and Preview should take you to the destination page.

Managing Links

Depending on the size of your PDF document, you may have a lot of links. If you need to manage the links on a document, you can click the "Links" annotation tool, and then click the small pencil tool (annotation tool) for the sidebar as well. This will list all links in the document, and upon selecting one Preview will show you the link and allow you to either edit it or remove it.

You can select multiple links, and then change the destination for all of them, so if you have multiple links for the same page, it may be easier to create the links first and then select them and set the destination page for them. Keep in mind that the links will be listed in the sidebar according to when they were created, so you may see the link selection jumping all over the page if you use the sidebar to select your links.

UPDATE: Apple has released a knowledgebase article outlining how to combine PDF documents, which you can read here: http://support.apple.com/kb/HT4075



Questions? Comments? Post them below or email us!
Be sure to check us out on Twitter and the CNET Mac forums.