[pdftex] Destination of links within one document

Hans Hagen pragma at wxs.nl
Thu Jan 4 09:10:31 CET 2001


At 04:00 PM 1/3/01 +0000, Jascha Repp wrote:
>Hi,
>
>I recently used pdftex and I like it very much. But I have had a problem
>with the destination points of links within one document, which I think is
>a general problem and I wonder how others think about that:
>
>The destination point is set by the command \pdfdest to the bottom of the
>current line of text. So if I refer to this destination point the left
>upper corner of the Acrobat Reader window is set to exactly this point in
>the document. (This is the case if the Acrobat Reader Window is a lot
>smaller than one page, otherwise the whole page can be seen).
>This seems to be correct so far but it has a problem: The line of text,
>which I refer to, is then NOT to be read, because it is exactly ABOVE the
>visible section of the text. 
>So I would have to set the destination point one or two lines BEFORE the
>line, which I want to refer to. This is not a very nice solution, because
>one does not know where the lines will end and in some cases it is even not
>possible, for instance if I want to make a link to the beginning of a
>chapter. 
>So I found another solution, which is to put the \pdfdest command into a
>\put command within the picture enviroment. This enables me to add an
>arbitrary y-offset to the destination point.
>
>Did anybody had this problem? 
>Is there any nicer solution to this problem?
>Is this problem already known to the programmers and solved in the next
>version of pdftex?

This is definitely not something that should be handled in the pdftex core,
since it is viewer specific. Also, by using shifts like you do, you already
have control, and you can easilly overload \pdfdest to be displaced in a
systematic way. Hoewver, an automatism will fail in cases where lines end
up on unpredicted places [and who knows where tex will break the paragraph]. 

Also, since in pdf annotations have their own layer, and are implemented to
be independent of the text stream [which is not per se a good idea, since
thereby it is ignorant of scaling and rotation etc] the current pdftex
approach is probably the best.

Keep in mind that there are quite some 'is left to the viewer' things in
the pdf specs. The recently discussed threads are a good example of this.    

Hans
-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------




More information about the pdftex mailing list