Page-addressable PDF

In yesterday's item I complained about the opaqueness of PDF files. As Mark Kunzmann pointed out (in email), the situation is less dire than I suggested. He illustrated by pointing me to page 100 of the government's energy report here. I can point you to the page describing necessary URL syntax here. This scheme is workable, for large documents like the 170-page energy report, thanks to the same HTTP 1.1 byte-range technology that I've been using for random access to MP3 audio.

Thanks for the reminder, Mark. This falls into the category of things I used to know, but forgot. Now arguably, there's a reason I forgot about it. You rarely (if ever) see PDF URLs ending with #page=6 in the wild. My feeling is that's because a PDF page is an arbitrary unit of content, and it usually won't precisely address the element you'd like to refer to.

Note that there's also the #nameddest option, which works like an HTML fragment identifier and takes you to a specific location within a page. However this seems to be used even more rarely. I suspect that's because of the nature of the procedure required to prepare the destinations. Courtesy of Planet PDF, here is that procedure:

First up, you'll need to create the destination. To do this from within Acrobat:

  1. Manually navigate through the PDF for the desired location, and magnification
  2. Go to View > Navigation Tabs > Destinations
  3. Under Options, choose Scan Document
  4. Once this is completed, select New Destination from the Options menu and enter an appropriate name

Now that you have created your destination, you can link to it using a similar syntax to that used for page linking. After the name of the PDF, append "#nameddest=" and the name of your chosen destination. So, if your PDF has a named destination, "TOC", that points to a table of contents, then your link code will look like this:

<a href="http://www.mydomain.com/myPDF.pdf#nameddest=TOC">Link text</a>
[Planet PDF]
Live and learn. Or in this case, relearn!


Former URL: http://weblog.infoworld.com/udell/2004/10/05.html#a1088