Summary: FOP crashing with exception when embedding PNG
           Product: Fop
           Version: 0.95
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: normal
          Priority: P2
         Component: pdf
        ReportedBy: [EMAIL PROTECTED]

I'm including a PNG file in a document and FOP is crashing with the following
exception. This previously worked in fop 0.94. Note that there's a typo in the
error message and that could also be fixed.

java.lang.IllegalStateException: The resolution mus be set
        at org.apache.fop.cli.InputHandler.transformTo(
        at org.apache.fop.cli.InputHandler.renderTo(
        at org.apache.fop.cli.Main.startFOP(
        at org.apache.fop.cli.Main.main(


java.lang.IllegalStateException: The resolution mus be set

The PNG file in question was created using Dia. pngcheck for the image shows:
OK: a.png (567x400, 24-bit RGB, non-interlaced, 96.0%)
pngmeta showed nothing. My guess is that there is no information in the image
to indicate DPI. Surely, in this situation, it should just be guessing. The
XSL-FO used is as follows:
<fo:external-graphic src="url(a.png)" width="432pt" height="auto"
content-width="scale-to-fit" content-height="scale-to-fit"
content-type="content-type:image/png" text-align="center"/>
Given that it is scaling, I would have thought that the resolution should be
irrelevant. The XSL-FO file came from Docbook-xsl but I can reproduce it by
copying the file into a hello world XSL-FO file.

I'd prefer not to post the image file publicly but if anyone needs it, I can
e-mail it privately.

Oliver Kiddle

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to