Hi, Thanks for the response - I have tried to change from fo:instream-foreign-objects to fp:external graphics using either JPEG or PNG images created from my charts by my Cocoon application (ie., I can request these images from a browser, with correct MIME types, etc) using the following xsl:fo, but still no joy :(
<fo:external-graphic src="http://localhost:7001/cocoon/n13/chart/mfilist-report/mfi_report_countr y_category.jpg"/> I get the following error(s) in my log-file. ERROR (2003-05-27) 08:59.10:156 [cocoon.m] (/cocoon/list.report) ExecuteThread: '12' for queue: 'default'/MessageHandler: Could not load external SVG: The current document is unable to create an element of the requested type (namespace: http://www.w3.org/2000/svg, name: head). ERROR (2003-05-27) 08:58.14:796 [cocoon.m] (/cocoon/list.report) ExecuteThread: '12' for queue: 'default'/ExternalGraphic: Error while creating area : No ImageReade r for this type of image (http://localhost:7001/cocoon/n13/chart/mfilist-report/mfi_report_country_ca tegory.jpg) If I load the above URL directly in my browser, and Save As... to my local disk, change fo:external-graphic/@src to point to the file, it works. If I save theSVG to the local path, I get the following exception stack-trace ERROR (2003-05-27) 09:17.31:078 [cocoon.m] (/cocoon/n13/mfi/mfi-list.report) ExecuteThread: '9' for queue: 'default'/PDFRenderer: svg graphic could not be built: file:c:/mfi_report_country_category.svg:-1 An I/O error occured while processing the URI 'file:c:/mfi_report_country_category.svg#clipPath1' specified on the element <rect> org.apache.batik.bridge.BridgeException: file:c:/mfi_report_country_category.svg:-1 An I/O error occured while processing the URI 'file:c:/mfi_report_country_category.svg#clipPath1' specified on the element <rect> at org.apache.batik.bridge.BridgeContext.getReferencedElement(Unknown Source) at org.apache.batik.bridge.CSSUtilities.convertClipPath(Unknown Source) at org.apache.batik.bridge.AbstractGraphicsNodeBridge.buildGraphicsNode(Unknown Source) at org.apache.batik.bridge.SVGShapeElementBridge.buildGraphicsNode(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source) at org.apache.batik.bridge.GVTBuilder.build(Unknown Source) at org.apache.fop.render.pdf.PDFRenderer.renderSVGDocument(Unknown Source) at org.apache.fop.render.pdf.PDFRenderer.drawImageScaled(Unknown Source) at org.apache.fop.render.AbstractRenderer.renderImageArea(Unknown Source) at org.apache.fop.image.ImageArea.render(Unknown Source) at org.apache.fop.render.AbstractRenderer.renderLineArea(Unknown Source) at org.apache.fop.layout.LineArea.render(Unknown Source) at org.apache.fop.render.AbstractRenderer.renderBlockArea(Unknown Source) at org.apache.fop.layout.BlockArea.render(Unknown Source) at org.apache.fop.render.AbstractRenderer.renderAreaContainer(Unknown Source) at org.apache.fop.layout.ColumnArea.render(Unknown Source) at org.apache.fop.render.AbstractRenderer.renderSpanArea(Unknown Source) at org.apache.fop.layout.SpanArea.render(Unknown Source) at org.apache.fop.render.AbstractRenderer.renderBodyAreaContainer(Unknown Source) at org.apache.fop.render.pdf.PDFRenderer.renderPage(Unknown Source) at org.apache.fop.render.pdf.PDFRenderer.render(Unknown Source) at org.apache.fop.apps.StreamRenderer.queuePage(Unknown Source) at org.apache.fop.layout.AreaTree.addPage(Unknown Source) at org.apache.fop.fo.pagination.PageSequence.format(Unknown Source) at org.apache.fop.apps.StreamRenderer.render(Unknown Source) at org.apache.fop.fo.FOTreeBuilder.endElement(Unknown Source) For completeness, the definition and reference of #clipPath1 are copied (out-of-context) here: <clipPath clipPathUnits="userSpaceOnUse" id="clipPath1"> <path d="M0 0 L660 0 L660 520 L0 520 L0 0 Z"/> </clipPath> <rect x="0" y="0" clip-path="url(#clipPath1)" width="660" height="520" stroke="none"/> <rect x="8" y="4" transform="translate(-142.2265625,-500.421875)" clip-path="url(#clipPath1)" fill="white" width="644" height="489.421875" stroke="none"/> Any suggestions? Many Thanks, Adrian > -----Original Message----- > From: Robert Raposa [mailto:[EMAIL PROTECTED] > Sent: Monday 26 May 2003 22:19 > To: [EMAIL PROTECTED] > Subject: RE: Issue in including SVG charts in PDF > > > Adrian Giessel wrote: > > So, my problem is that a NullPointerException is thrown > within FOP (and > > caught / swallowed) when processing my charts. The message > in the logs is: > > > > ERROR (2003-05-26) 17:25.10:531 [cocoon.m] > > (/cocoon/n13/mfi/mfi-list.report) ExecuteThread: '10' for queue: > > 'default'/PDFRenderer: svg graphic could not be built: null > > java.lang.NullPointerException > > <<no stack trace available>> > > > > > > I cannot include the full xsl:fo (legal / size reasons), > but the pertinent > > fragent is attached. The fragment two > > <fo:instream-foreign-object/>s to test > > the overall generation. The first one displays without any issues. > > The second one is the one causing issues. However, the SVG > embedded is > > correctly rendered by Adobe SVG viewer, and also converts > correctly to a > > JPEG using Batik - hence the conclusion that this is a FOP issue. > > > > Has anyone come across this before, or can someone please > point me in the > > correct direction. > > Unfortunately - I do not have a solution to your issue. I > can at least > confirm that I too have seen this issue. The SVG seems to > render fine in an > FOP:AWT-Preview screen. But - when saved to PDF - I get the > null pointer > exception. As a temporary work around I am using PNG instead. > > I can however add some stack trace information (using FOP > 0.20.4). I could > also provide supporting data if it would help someone. My data has no > privacy issues. > > java.lang.NullPointerException at > org.apache.fop.svg.PDFTextPainter.paint(Unknown Source) at > org.apache.batik.gvt.TextNode.primitivePaint(Unknown Source) at > org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown > Source) at > org.apache.batik.gvt.TextNode.paint(Unknown Source) at > org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unkn > own Source) > at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown > Source) at > org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unkn > own Source) > at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown > Source) at > org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unkn > own Source) > at > org.apache.batik.gvt.CanvasGraphicsNode.primitivePaint(Unknown Source) > at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown > Source) at > org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unkn > own Source) > at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown > Source) at > org.apache.fop.render.pdf.PDFRenderer.renderSVGDocument(Unknow > n Source) at > org.apache.fop.render.pdf.PDFRenderer.drawImageScaled(Unknown > Source) at > org.apache.fop.render.AbstractRenderer.renderImageArea(Unknown > Source) at > org.apache.fop.image.ImageArea.render(Unknown Source) at > org.apache.fop.render.AbstractRenderer.renderAreaContainer(Unk > nown Source) > at org.apache.fop.layout.ColumnArea.render(Unknown Source) at > org.apache.fop.render.AbstractRenderer.renderSpanArea(Unknown > Source) at > org.apache.fop.layout.SpanArea.render(Unknown Source) at > org.apache.fop.render.AbstractRenderer.renderBodyAreaContainer(Unknown > Source) at > org.apache.fop.render.pdf.PDFRenderer.renderPage(Unknown Source) > at org.apache.fop.render.pdf.PDFRenderer.render(Unknown > Source) at > org.apache.fop.apps.StreamRenderer.queuePage(Unknown Source) at > org.apache.fop.layout.AreaTree.addPage(Unknown Source) at > org.apache.fop.fo.pagination.PageSequence.format(Unknown > Source) at > org.apache.fop.apps.StreamRenderer.render(Unknown Source) at > org.apache.fop.fo.FOTreeBuilder.endElement(Unknown Source) at > org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java > :1403) at > org.apache.xerces.validators.common.XMLValidator.callEndElemen > t(XMLValidator > .java:1480) at > org.apache.xerces.framework.XMLDocumentScanner$ContentDispatch > er.dispatch(XM > LDocumentScanner.java:1149) at > org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDo > cumentScanner. > java:381) at > org.apache.xerces.framework.XMLParser.parse(XMLParser.java > :1081) at > org.apache.fop.apps.Driver.render(Unknown Source) at > org.apache.fop.apps.Driver.run(Unknown Source) > > - Robert > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > Any e-mail message from the European Central Bank (ECB) is sent in good faith but shall neither be binding nor construed as constituting a commitment by the ECB except where provided for in a written agreement. This e-mail is intended only for the use of the recipient(s) named above. Any unauthorised disclosure, use or dissemination, either in whole or in part, is prohibited. If you have received this e-mail in error, please notify the sender immediately via e-mail and delete this e-mail from your system. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
