[pdftex] redundant objects with includegraphics

Otfried Cheong otfried at cs.uu.nl
Tue May 1 13:05:17 CEST 2001


Reinhard Kotucha <reinhard at kammer.uni-hannover.de> writes:
 >
 > >>>>> "Andreas" == Andreas Matthias <amat at kabsi.at> writes:
 > 
 >     > In comp.text.pdf there are quite often questions about how to
 >     > create pdf documents in 2up and 4up mode. If redundant objects
 >     > could be reduced, pdftex would be the answer.
 > 
 > pdftex is the answer, anyway.  But as far as optimization is
 > concerned, I think that a post processor could do a better job.  The
 > reason is that TeX cannot look ahead.

Would it perhaps be easier to do this if one left part of the work to
the user (or the macro package)?  I could imagine this to work as
follows:

There is a variant of \pdfximage that would include a PDF file and
create XObject's for each of its pages.  These XObject's are numbered
consecutively, \pdflastximage returns the number of the first page,
and \pdflastximagepages (or so) returns the number of pages read.

The TeX document can now use the pages of the document using
\pdfrefximage (with a number in the range \pdflastximage
.. \pdflastximage + \pdflastximagepages - 1).  

All resources used by ALL PAGES of the PDF file would be included in
the pdftex output either immediately by \pdfximage or when the first
page is referenced.  

Otfried Cheong




More information about the pdftex mailing list