<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1251">
<META content="MSHTML 5.50.4807.2300" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Tahoma>Hi Everybody,</FONT></DIV>
<DIV><FONT face=Tahoma></FONT> </DIV>
<DIV><FONT face=Tahoma>Please help. :) </FONT></DIV>
<DIV><FONT face=Tahoma></FONT> </DIV>
<DIV><FONT face=Tahoma></FONT><FONT face=Tahoma></FONT> </DIV>
<DIV><FONT face=Tahoma>I am trying to create a PDF document (DVI is not a
requirement) that would<BR>show the total number of pages on each page (e.g.
PAGE X OF Y), and do it in<BR>one front-to-back linear pdfTeX pass! I believe it
can be done in PDF by<BR>using "forward object references" (I also did not think
it was possible<BR>until a colleague of mine suggested this interesting method).
For example,<BR>the output doc can look as follows:<BR><BR>page 1: PAGE 1 OF
<reference to 1000 0 R><BR>page 2: PAGE 2 OF <reference to 1000 0
R><BR>....<BR>page 100: PAGE 100 OF <reference to 1000 0 R><BR>1000 0
obj <<...100...>><BR><BR>As per my understanding pdfTeX allows you
to output an object first, and<BR>only then you can get its object
number (reference). What I would like to<BR>do is, for example:<BR>-- allocate
an object reference first \myobjref<BR>-- use this reference on every page:
\pdfrefobj\myobjref<BR>-- specify the object reference to \pdfobj when I output
the my object in<BR>the end, e.g.: \pdfobj objref\myobjref ...<BR><BR>Is there a
way to achieve this in pdfTeX?<BR><BR>Thank you,<BR>Igor.<BR></DIV></FONT><FONT
face=Tahoma></FONT>
<DIV><FONT face=Tahoma> </DIV></FONT></BODY></HTML>