Focus on Distinction

John laPlante's blog. The title comes from the idea that there is often some critical detail that makes all the difference in a design, a movie, an event, etc. I am espeically interested in usability and design.

Tuesday, July 07, 2009

Hyperlinks to Anchors in a PDF: Using MS Word to Produce the PDF

I recently wanted to hyperlink to a PDF and open it at a certain place, much like a anchor in a web page. This turns out to be possible but wasn't as easy as I'd like. Documentation for this is available but is scattered. In my case, I was using MS Word to author. The documentation instructed me to add 'named destinations' to the PDF file. Named destinatios are equivelant to bookmarks in MS Word or anchors in HTML. I have the full version of Acrobat so I could do add these named destinations but every time I convert the Word file to PDF, it would erase the 'named destinations.' I found that I could add Print Fields to my MS Word document and those would be converted into 'named destinations' during the conversion to PDF. Fields in MS Word are essentially codes that you can add to the file. The reader doesn't see them. They are usually used for formatting etc.

The following series of ScreenShots shows you some of the key areas of the Word and Acrobat UI for working with 'named destinations'.

A text string that I want to link to - that is I want a 'named destination' here when I make the PDF.

In MS Word 2007, I use the Insert tab, Quick Parts menu and choose fields.
MS Word has this field dialog where you can insert a Print Field. The image shows the format that you need for 'named destinations.' The 'named destination' will be named VD01. That is the value you will put on the end of your URL (e.g., http://mydomain.com/mypage.html#VD01). I recorded a macro to insert these things which made it considerable y easier to repeat than having to type that long windowed thing into the dialog box.




After you add a Print Field, you can edit it by pressing Alt-F9 in MS Word. The Print Field looks like a bunch of garbage (a little scary I agree). But, you can right click on it and choose Edit Field to re-open the fields dialog.

You can view, edit, and add 'named destinations' in Acrobat Professional.

Here is the list of 'named destinations' in Acrobat

Some useful links that discuss the theory:
http://support.adobe.com/devsup/devsup.nsf/docs/52198.htm
https://www.planetpdf.com/forumarchive/50911.asp
http://cws.internet.com/article/4069-.htm




Labels: , , , , , , , , , ,