[pdftex] pdf objects with references to each other?
Heiko Oberdiek
oberdiek at ruf.uni-freiburg.de
Mon Apr 1 13:05:28 CEST 2002
On Sat, 30 Mar 2002, Hans Hagen wrote:
> >I had wondered if something like this might work, but I
> >was worried that something like \pdflastobj+2 could
> >hit upon a number that had already been used somehow,
> >if pdftex's method for choosing object numbers was
> >a bit complicated.
>
> (1) it's best to treat object numbers kind of neutral, i.e. when you store
> them in a counter, it does not matter how pdftex increments them
>
> (2) making macros depend on such things as inc(2) is definitely a bad idea,
> since this magic 2 is not documented and cannot be considered a fixed feature
Do you know a documented feature that can be used to solve
the cyclic reference problem?
\pdfobj{I am A and references B}
\pdfobj{I am B and references A}
> (3) it happens that object refs are numbers, but in a more advanced sheme
> they could as well be token lists representing the object number and
> revision number i.e. \the\pdflastobj expanding to something "0 10" or "2 40"
pdfTeX creates a PDF file for the first time. It would be a bad
implementation, if there are revision numbers not equal 0.
So pdfTeX does not contain documented access to the revision
number of objects.
> (4) also, if for some reason (say a user error) a page break occurs between
> two pdfobj/anots, or some kind of other resource is inserted (one never
> knows), this method can lead to interesting effects
Yes, this has to be avoided.
> (5) so, carying over in a macro is a bit better than incrementing
How a macro can help here?
Yours sincerely
Heiko <oberdiek at uni-freiburg.de>
More information about the pdftex
mailing list