[pdftex] redundant objects with includegraphics

Heiko Oberdiek oberdiek at ruf.uni-freiburg.de
Fri May 4 03:39:17 CEST 2001


At 15:23 02.05.2001 +0200, Otfried Cheong wrote:
>
> > isn't that what pdfpages does?  i've never looked at its insides.
>
>'pdfpages' is built on top of 'graphicx', so it suffers from the same
>resource duplication.  Which is probably the reason why Andreas asked
>about it in the first place :-)
>
>Speaking about 'pdfpages', I suggest that while we are at it, we add a
>primitive "\pdflastximagerotation" to return the value of the /Rotate
>page attribute of an included PDF page.  It would allow 'pdfpages' to
>rotate them back the way they are supposed to look.

Yes.

But more important is, how can someone get the number of
pages?
* Currently I scan the pdf file for /Count entries and assume
  the maximum is the page number.
* This week I have learned about \pdflastximagepages. But is there
  a more elegant way than
    \begingroup
      \sbox0{\includegraphics{foo.pdf}}%
      \xdef\foopages{\the\pdflastximagepages}%
    \endgroup
    Result: foo.pdf has \foopages\ page(s).
    ...
    \includepdf[pages=1-\foopages]{foo.pdf}

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



More information about the pdftex mailing list