[pdftex] Reference to objects in outlines.

Paul Isambert zappathustra at free.fr
Sun Jan 16 14:22:02 CET 2011

Hello all,

When you create a bookmark with a user action instead of a goto, pdfTeX 
stores the action in an object and refers to it in the outline 
dictionary. For instance

\pdfoutline user {<< /S/URI /URI (http://www.tug.org) >>}{Go to TUG!}

produces an object with the action dictionary:

1 0 obj
<< /S/URI /URI (http://www.tug.org) >>

and in the outline dictionary it refers to it:

/A 1 0 R

This is fine, except when you want to refer to an action dictionary you 
have defined yourself. Suppose for instance that object 1 was created 
independantly. I can't make \pdfoutline refer to that action, because it 
must be fed an action dictionary, not a reference to such a dictionary. 
The best I can do is use a unexisting named action (because PDF allows 
that) with a /Next field pointing to my object:

\pdfoutline user {<< /S/Named /N/NoAction /Next 1 0 R >>}{Go to TUG!}

and this produces (arbitrary object numbers, of course):

2 0 obj
<< /S/Named /N/NoAction /Next 1 0 R >>

... (outline dictionary)
/A 2 0 R

This works, but I find it terribly unelegant. Is there another way? I.e. 
(I suppose) can we have chains of references in PDF, so that the object 
to which the outline points would be no more than a reference to another 
object (the action I have defined)?


More information about the pdftex mailing list