Details
Description
Upgrading from FOP 1.0 to FOP 2.0, we have some issues with some SVGs that we embed in the XSL-FOs (see also FOP-2495).
The path in the xsl-fo (e.g. "images/TestLogo.svg") somehow gets an invalid path ("images\images\TestLogo.svg") during FOP rendering (to PDF). We noticed this on SVGs generated with inkscape that has "url()" calls like this:
----------------------
...
<g id="Gruppe3" clip-path="url(#Clip0)">
<path ...
...
------------------------
Exception thrown:
-----------------
Error while rendering page 1
java.lang.RuntimeException: SVG graphic could not be built. Reason: org.apache.batik.bridge.BridgeException: images\images\TestLogo.svg (Das System kann den angegebenen Pfad nicht finden)
at org.apache.fop.events.EventExceptionManager.throwException(EventExceptionManager.java:76)
at org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:175)
at com.sun.proxy.$Proxy4.svgNotBuilt(Unknown Source)
at org.apache.fop.render.pdf.PDFImageHandlerSVG.handleImage(PDFImageHandlerSVG.java:107)
at org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:249)
at org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:205)
at org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:170)
at org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingURI(AbstractIFPainter.java:292)
at org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:173)
at org.apache.fop.render.intermediate.IFRenderer.drawImage(IFRenderer.java:1295)
at org.apache.fop.render.intermediate.IFRenderer.renderImage(IFRenderer.java:1282)
at org.apache.fop.render.AbstractRenderer.renderInlineViewport(AbstractRenderer.java:858)
at org.apache.fop.render.AbstractPathOrientedRenderer.renderInlineViewport(AbstractPathOrientedRenderer.java:832)
at org.apache.fop.render.intermediate.IFRenderer.renderInlineViewport(IFRenderer.java:863)
at org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:715)
at org.apache.fop.render.intermediate.IFRenderer.renderInlineArea(IFRenderer.java:927)
at org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:690)
at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:572)
at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:613)
at org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:999)
at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:557)
at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:613)
at org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:999)
at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:557)
at org.apache.fop.render.AbstractPathOrientedRenderer.renderReferenceArea(AbstractPathOrientedRenderer.java:757)
at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:600)
at org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:999)
at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:557)
at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:613)
at org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:999)
at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:557)
at org.apache.fop.render.AbstractRenderer.renderRegion(AbstractRenderer.java:343)
at org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer.java:307)
at org.apache.fop.render.intermediate.IFRenderer.renderRegionViewport(IFRenderer.java:738)
at org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java:262)
at org.apache.fop.render.AbstractRenderer.renderPage(AbstractRenderer.java:243)
at org.apache.fop.render.intermediate.IFRenderer.renderPage(IFRenderer.java:586)
at org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:123)
at org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.finishPage(AbstractPageSequenceLayoutManager.java:315)
at org.apache.fop.layoutmgr.PageSequenceLayoutManager.finishPage(PageSequenceLayoutManager.java:216)
at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:140)
at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267)
at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:130)
at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:360)
at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:190)
at org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)
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:485)
at de.icomps.xml.FOP.transformFO(FOP.java:1006)
at de.icomps.xml.FOP.fo2PDF(FOP.java:762)
at de.icomps.rep.Report.createWithFOP(Report.java:3750)
at de.icomps.rep.Report.processReport(Report.java:2104)
at de.icomps.rep.ReportProtocol.createProtocolReport(ReportProtocol.java:201)
at de.icomps.rep.ReportProtocol.createReport(ReportProtocol.java:69)
at de.icomps.rep.Report.startProcessing(Report.java:1650)
at de.icomps.ijs.JobTask.startJob(Unknown Source)
at de.icomps.ijs.JobTask.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.batik.bridge.BridgeException: images\images\B10250.svg (Das System kann den angegebenen Pfad nicht finden)
at org.apache.batik.bridge.BridgeContext.getReferencedNode(Unknown Source)
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.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.PDFImageHandlerSVG.handleImage(PDFImageHandlerSVG.java:103)
... 61 more
--------------------------
We managed to get this working by manually removing the
clip-path="url(#Clip0)"
attribute from teh SVG, so we expect that Batik has problems with URI resolving of these url() calls .
Attachments
Attachments
Issue Links
- duplicates
-
FOP-2489 An SVG file using markers is not rendered by FOP 2.0
- Resolved