[pdftex] \pdfximage with zero size PDF

Will Robertson wspr81 at gmail.com
Wed Dec 5 00:08:08 CET 2007


Over on c.t.t. I brought up the topic that pdfTeX's behaviour in PDF  
mode for bad input isn't quite as graceful as in DVI mode. One  
example was trying to include a non-existent PDF image, and Heiko's  
helpfully updated pdftex.def to deal with that problem.

Another edge case is trying to include a zero (physical) size PDF, as  
shown below:

Heiko Oberdiek wrote:
 > Will Robertson wrote:
 > > ! pdfTeX error (ext1): invalid image dimensions.
 > > \reserved at a ->\pdfximage {\PDFcontainer }
 > >                                          \edef \ppf at container@max
 > > {\the \pdf...
 > > l.349   }
 > >          %
 > > !  ==> Fatal error occurred, no output PDF file produced!
 > The following minimal model is derived from your description:
 > % pdftex t0.tex
 > \pdfpagewidth1sp
 > \pdfpageheight1sp
 > \shipout\null
 > \bye
 > % pdftex t1.tex
 > \setbox0=\hbox{\pdfximage{t0.pdf}}
 > \bye
 > The error is thrown by procedure scale_image in pdftex.web
 > and is triggered if the width or height of the image is zero.
 > Thus if this fatal error bothers you, make a pdfTeX bug report
 > and/or add a patch that improves the current behaviour.

What are the feelings of those here about the behaviour in this case?  
I suppose I'd expect pdfTeX simply to insert a zero size box...

(To be more explicit about how this can occur, it arises if you use  
pst-pdf on a document that tries to load an eps image that doesn't  
exist (and you're running in nonstopmode).)


More information about the pdftex mailing list