PDFs: not quite unlinkable

I’ve always just accepted the received wisdom that you can’t really link to PDFs very well: you can link to the whole file, but then it’s up to your reader to track down what you actually wanted to link to. In fact, I’ve gotten to keep track of a lot of people’s interest in Rasmus Lerdorf’s idea for funky caching because, as I said at the time, it’s on page 25 of the accursed PDF file.

However, if you follow that link, you should find yourself on page 25. Apparently, just like with named anchors in HTML, although you can only go to a specific spot if the original author put in named destinations, you can still do quite a bit with links to PDFs. That link goes to an Adobe file describing the ways you can link, which on its own wants to open in “Fit Width” scale, with the Bookmarks sidebar open, at page one, but with the addition of #pagemode=none&page=5&zoom=150,0,520 will open without the Bookmarks, on page 5, at 150%, at some location down the page that I’m not sure about. The docs only say that “scroll values left and top are in a coordinate system where 0,0 is the top left of the page” without mentioning what scale, if any, the coordinate system uses. For me, at 1024×768, that direct link puts it right at the page=pagenum section, but I’d be interested in hearing if it doesn’t at other resolutions (or at the same resolution, for that matter).

[Via a comment at Roland Tanglao’s, where I was planning on chiming in on the original “PDFs are evil because you can’t link to anything but the blob” post.]

11 Comments

Comment by Jeroen #
2004-06-22 06:14:34

Phil,
1400×1050 ends up on axactly the same spot.
//Jeroen

 
Comment by JOY INFLATABLE CO.,LTD. #
2004-06-28 02:35:23

We offer high quality inflatable products in any size or style, include Inflatable Games, Inflatable Castles, Inflatable Sliders, Inflatable Bounces, Inflatable Climbing, Inflatable Obstacles, Inflatable Tunnels, Inflatable Sport Games, Inflatable Fun Fair etc., Inflatable cartoons, Moving Cartoons, Camps and Tents, Inflatable Arches, Air Dancers, Product Models, Christmas Products, Balloons and so on.

Comment by Marcus #
2004-06-28 05:11:28

Do you do inflatable dart-boards?

Comment by Phil Ringnalda #
2004-06-28 07:23:04

Seems like there’s one other inflatable thing they forgot to mention.

 
 
 
Comment by Gerald #
2004-06-28 07:15:21

i wonder how old this feature of pdf-deeplinks is, and why it took so long to come to my attention.
apropos attention, what’s about the chinese spam?

kind regards,
gerald

 
Comment by Gerald #
2004-06-28 07:23:34

modern kind of dictation:
”Please preview your modified entry before posting it.”
i made a preview, made a minor correction (one letter) and after that directly wanted to post – wrong assumption.

perhaps time will come when you first have to successfully pass a spellchecker in order to make a comment ;-)

Comment by Phil Ringnalda #
2004-06-28 07:50:31

If the required spellchecker’s coming, it’s a long way off: they mostly strike me as merely annoying.

The forced preview, however, has to force you to preview after any change, because your change might be to add an unencoded ampersand, making it impossible to deliver the page as application/xhtml+xml (at some time in the future, once I squash a few more bugs and clean up the rest of the archives).

Comment by Gerald #
2004-06-28 15:22:21

thanks, now it’s clear :)

 
 
 
Comment by Phil Ringnalda #
2004-06-29 23:04:22

Posted on: ISO-8859-1

Note to self: take the debug code out when you are done with it. Oops.

 
Trackback by Blog Promagna #
2004-06-21 13:01:03

Richtiges Verlinken von PDF-Dateien

Phil Ringnalda zeigt uns wie man PDF-Dateien richtig verlinkt. Ähnlich wie in HTML lassen sich mit der Raute Anker anspringen, beispiel.pdf#page=5 würde z.B. auf die 5. Seite der Datei beispiel.pdf springen. Weitere nützliche Parameter kann man in eine…

 
Trackback by ISO-8859-1 #
2004-06-29 22:52:21

PDFs: not quite unlinkable

Phil Ringnalda points to an interesting titbit: how to ’deep-link’ into PDFs. I can see myself using this all the time at work.

 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <del datetime="" cite=""> <dd> <dl> <dt> <em> <i> <ins datetime="" cite=""> <kbd> <li> <ol> <p> <pre> <q cite=""> <samp> <strong> <sub> <sup> <ul> in your comment.