[pdftex] Forward looking object references
Igor Khomyakov
igorkh at optonline.net
Sat Mar 8 17:18:08 CET 2003
John, thank you for your reply.
I am trying to create a PDF document (DVI is not a requirement) that would
show the total number of pages on each page (e.g. PAGE X OF Y), and do it in
one front-to-back linear pdfTeX pass! I believe it can be done in PDF by
using "forward object references" (I also did not think it was possible
until a colleague of mine suggested this interesting method). For example,
the output doc can look as follows:
page 1: PAGE 1 OF <reference to 1000 0 R>
page 2: PAGE 2 OF <reference to 1000 0 R>
....
page 100: PAGE 100 OF <reference to 1000 0 R>
1000 0 obj <<...100...>>
As per my understanding pdfTeX allows you to output an object first, and
only then to get hold of its object number (reference). What I would like to
do is, for example:
-- allocate an object reference first \myobjref
-- use this reference on every page: \pdfrefobj\myobjref
-- specify the object reference to \pdfobj when I output the my object in
the end, e.g.: \pdfobj objref\myobjref ...
Is there a way to achieve this in pdfTeX?
Thank you,
Igor.
----- Original Message -----
From: "John Culleton" <john at wexfordpress.com>
To: "Igor Khomyakov" <igorkh at optonline.net>; <pdftex at tug.org>
Sent: Thursday, March 06, 2003 9:19 AM
Subject: Re: [pdftex] Forward looking object references
> On Tuesday 04 March 2003 11:38 pm, Igor Khomyakov wrote:
> > Hi,
> >
> > I have a question on \pdfobj\pdfrefobj\pdflastobj. Is there any way you
can
> > get the obj reference before you output the object, i.e. can you do
> > "forward" looking obj references with pdftex?
> >
> > Thank you,
> >
> > Igor Khomyakov
> > E-mail: igorkh at optonline.net
>
> I think you mean use the object before it is defined. This would probably
mean
> a two-pass evaluation of the source file. While two passes are necessary
for
> e.g., TOC and index I don't see the necessity of using objects first,
> defining them later. TeX is essentially a linear process, front to back.
>
> IMHO of course.
>
> John Culleton
> _______________________________________________
> pdftex mailing list
> pdftex at tug.org
> http://tug.org/mailman/listinfo/pdftex
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pdftex/attachments/20030308/9f4edf28/attachment.htm
More information about the pdftex
mailing list