[pdftex] redundant objects with includegraphics

Heiko Oberdiek oberdiek at ruf.uni-freiburg.de
Tue May 1 14:36:15 CEST 2001


At 12:05 01.05.2001 +0200, Otfried Cheong wrote:
>
>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.
>
>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.  

But, if only one page is needed, then _all_ resources will be
included instead of perhaps ten percent.

I agree with Reinhard, that a post processor can do a better job:
* Detecting and removing redundant objects.
* Reorganisation to make a more effective structur.
* Removing unnecessary white spaces.
* Linearizing/optimizing the pdf file.
* Independence of the producer of the pdf file
  (pdfTeX, gs, dvipdfm, ...).

And perhaps other features:
* "psnup", "psselect".
* Adding/removing encryption.
* Manipulating (adding/changing/removing values).

Finally one or some persons are welcome with a lot of free
time that are willing to create such a free program ;-)

Yours sincerely
  Heiko <oberdiek at ruf.uni-freiburg.de>



More information about the pdftex mailing list