You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Dominic Brügger <br...@puzzle.ch> on 2006/12/11 10:21:19 UTC
PNG images in RTF
I'm getting the NullPointerException below when including a PNG image
with fo:external-graphic to produce RTF output. I am using an actual FOP
trunk. I attached a simple example that produces the error.
As PNG images should be supported by FOP I think this is a bug. Or is
there an error in my FO file?
Regards
Dominic
java.lang.NullPointerException
at org.apache.commons.io.IOUtils.copy(IOUtils.java:920)
at org.apache.commons.io.IOUtils.toByteArray(IOUtils.java:215)
at
org.apache.fop.image.AbstractFopImage.loadDefaultOriginalData(AbstractFopImage.java:223)
at
org.apache.fop.image.ImageIOImage.loadOriginalData(ImageIOImage.java:217)
at
org.apache.fop.image.AbstractFopImage.load(AbstractFopImage.java:174)
at org.apache.fop.render.rtf.RTFHandler.image(RTFHandler.java:1131)
at
org.apache.fop.render.rtf.RTFHandler.invokeDeferredEvent(RTFHandler.java:1492)
at
org.apache.fop.render.rtf.RTFHandler.recurseFONode(RTFHandler.java:1616)
at
org.apache.fop.render.rtf.RTFHandler.recurseFONode(RTFHandler.java:1687)
at
org.apache.fop.render.rtf.RTFHandler.recurseFONode(RTFHandler.java:1687)
at
org.apache.fop.render.rtf.RTFHandler.recurseFONode(RTFHandler.java:1639)
at
org.apache.fop.render.rtf.RTFHandler.endPageSequence(RTFHandler.java:236)
at
org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:148)
at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:378)
at
org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:194)
at
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1101)
at
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:160)
at org.apache.fop.cli.Main.main(Main.java:191)
Re: PNG images in RTF
Posted by Chris Bowditch <bo...@hotmail.com>.
Dominic Brügger wrote:
> I'm getting the NullPointerException below when including a PNG image
> with fo:external-graphic to produce RTF output. I am using an actual FOP
> trunk. I attached a simple example that produces the error.
>
> As PNG images should be supported by FOP I think this is a bug. Or is
> there an error in my FO file?
I forgot to add to my last mail that I have raised a bugzilla entry for
this bug:
http://issues.apache.org/bugzilla/show_bug.cgi?id=41149
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: PNG images in RTF
Posted by Chris Bowditch <bo...@hotmail.com>.
Dominic Brügger wrote:
> I'm getting the NullPointerException below when including a PNG image
> with fo:external-graphic to produce RTF output. I am using an actual FOP
> trunk. I attached a simple example that produces the error.
>
> As PNG images should be supported by FOP I think this is a bug. Or is
> there an error in my FO file?
Thanks for reporting this. I believe it is a bug. Although at first I
thought your FO was faulty as you have specified a
content-type="image/bmp" on the external-graphic element which is
incorrect and may have caused FOP to think it was dealing with a BMP not
a PNG. Removing this attribute did not fix the problem though :(
<snip/>
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: PNG images in RTF
Posted by le...@yahoo.de.
I got the same error when including a PNG-Image.
Regards
Leeloo
Dominic Brügger <br...@puzzle.ch> schrieb: I'm getting the NullPointerException below when including a PNG image
with fo:external-graphic to produce RTF output. I am using an actual FOP
trunk. I attached a simple example that produces the error.
As PNG images should be supported by FOP I think this is a bug. Or is
there an error in my FO file?
Regards
Dominic
java.lang.NullPointerException
at org.apache.commons.io.IOUtils.copy(IOUtils.java:920)
at org.apache.commons.io.IOUtils.toByteArray(IOUtils.java:215)
at
org.apache.fop.image.AbstractFopImage.loadDefaultOriginalData(AbstractFopImage.java:223)
at
org.apache.fop.image.ImageIOImage.loadOriginalData(ImageIOImage.java:217)
at
org.apache.fop.image.AbstractFopImage.load(AbstractFopImage.java:174)
at org.apache.fop.render.rtf.RTFHandler.image(RTFHandler.java:1131)
at
org.apache.fop.render.rtf.RTFHandler.invokeDeferredEvent(RTFHandler.java:1492)
at
org.apache.fop.render.rtf.RTFHandler.recurseFONode(RTFHandler.java:1616)
at
org.apache.fop.render.rtf.RTFHandler.recurseFONode(RTFHandler.java:1687)
at
org.apache.fop.render.rtf.RTFHandler.recurseFONode(RTFHandler.java:1687)
at
org.apache.fop.render.rtf.RTFHandler.recurseFONode(RTFHandler.java:1639)
at
org.apache.fop.render.rtf.RTFHandler.endPageSequence(RTFHandler.java:236)
at
org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:148)
at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:378)
at
org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:194)
at
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1101)
at
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:160)
at org.apache.fop.cli.Main.main(Main.java:191)
page-height="29.7cm" page-width="21cm" margin-top="1cm"
margin-bottom="1cm" margin-left="1.5cm" margin-right="1.5cm">
src="moon.png"
inline-progression-dimension.optimum="auto"
inline-progression-dimension.maximum="490px"
block-progression-dimension.optimum="auto"
block-progression-dimension.maximum="680px" />
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------
Jetzt Mails schnell in einem Vorschaufenster überfliegen. Dies und viel mehr bietet das neue Yahoo! Mail .