[NTG-pdftex] pdfpagebox

Heiko Oberdiek oberdiek at uni-freiburg.de
Thu Sep 15 14:57:59 CEST 2005


Hello,

On Thu, Sep 15, 2005 at 04:31:18AM -0700, Thanh Han The wrote:

> Another issue is that I am implementing a primitive
> requrested by Cho, to grab the BBox of an included pdf.

What's the purpose? The knowledge of width and height is
important (graphicx, pdfpages, ...). By putting \pdfximage
into a box these values are easily available (see pdftex.def).
I would be interested, in which case the exact offset must
be known.

> Syntax:
> 
> \pdfximagebbox\pdflastximage 1 => print BBox1 
> ...
> \pdfximagebbox\pdflastximage 4 => print BBox4
> 
> A question here: what should be printed? something like
> 10pt, or 10sp, or 10bp, or just 10? 10pt seems to be easy
> and also consistent with syntax of similar primitives,
> however the BBox of pdf is often in bp, so instead of 10bp
> we would get 10.03749pt. Is this a problem?

What about returning a dimen like \wd, \ht, and \dp that
take the box number as argument?

Next issues:
* I assume the box (media, crop, ...) is choosen by
  the previous \pdfximage?
* What is "1" until "4"?
  * It is the first until fourth component
    of the box retangle, given in the pdf file?
  * The pdf spec says that the box typically has the form:
      [ ll_x ll_y ur_x ur_y ]
    (PDF spec for 1.6, section "3.8.4 Rectangle")
    But there is a note that says that any two diagonally
    opposite corners are acceptable and that applications that
    process PDF should be prepared to normalize such rectangles.
    The question is now, does pdfTeX normalize the rectangle?
    This has the advantage that the numbers "1" until "4" also
    have the symbolic meaning "ll_x" until "ur_y".

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


More information about the ntg-pdftex mailing list