I have encountered an obstacle to using SVG embedded graphics. I have been able to reproduce the problem using the embedded.fo example. Certainly this is some sort of environmental issue. I have done a lot of searching for an answer, but without a good result.
The attached text documents the command line (running Windows 8), as well as the console output describing the exception. Several exceptions were thrown, all apparently the same, but the number of exceptions does not match the number of instream-foreign-objects. (My attachment shows the output for one exception.) No PDF document is produced. I have used FOP a bit before, so I am not a novice, but this one has me stumped. A thread on the batik user mailing list had me playing with namespaces in the example, but that does not seem to be the issue. I still go back to some sort of setup issue, but not sure what it could be; I presume that the SVG examples all worked upon release. Please help. Tom Morrison Hill Country Software
Command line "java" -cp ";C:\FOP\fop-1.1\build\fop.jar;C:\FOP\fop-1.1\lib\avalon-framework-4.2.0.jar;C:\FOP\fop-1.1\lib\batik-all-1.7.jar;C:\FOP\fop-1.1\lib\commons-io-1.3.1.jar;C:\FOP\fop-1.1\lib\commons-logging-1.0.4.jar;C:\FOP\fop-1.1\lib\saxon-fop.jar;C:\FOP\fop-1.1\lib\saxon-jdom.jar;C:\FOP\fop-1.1\lib\saxon-xml-apis.jar;C:\FOP\fop-1.1\lib\saxon.jar;C:\FOP\fop-1.1\lib\serializer-2.7.0.jar;C:\FOP\fop-1.1\lib\xalan-2.7.0.jar;C:\FOP\fop-1.1\lib\xercesImpl-2.7.1.jar;C:\FOP\fop-1.1\lib\xml-apis-1.3.04.jar;C:\FOP\fop-1.1\lib\xml-apis-ext-1.3.04.jar;C:\FOP\fop-1.1\lib\xmlgraphics-commons-1.5.jar" org.apache.fop.cli.Main -fo embedding.fo -pdf try.pdf -c c:\XSLFastDemo\fop.xconf Console dump on exception (: java.lang.ClassCastException: org.apache.batik.dom.GenericElement cannot be cast to org.apache.batik.dom.svg.SVGOMElement at org.apache.fop.fo.extensions.svg.SVGElement.getDimension(SVGElement.java:139) at org.apache.fop.fo.flow.InstreamForeignObject.prepareIntrinsicSize(InstreamForeignObject.java:112) at org.apache.fop.fo.flow.InstreamForeignObject.getIntrinsicWidth(InstreamForeignObject.java:125) at org.apache.fop.layoutmgr.inline.AbstractGraphicsLayoutManager.getInlineArea(AbstractGraphicsLayoutManager.java:59) at org.apache.fop.layoutmgr.inline.AbstractGraphicsLayoutManager.getNextKnuthElements(AbstractGraphicsLayoutManager.java:116) at org.apache.fop.layoutmgr.inline.LineLayoutManager.collectInlineKnuthElements(LineLayoutManager.java:689) at org.apache.fop.layoutmgr.inline.LineLayoutManager.getNextKnuthElements(LineLayoutManager.java:622) at org.apache.fop.layoutmgr.BlockLayoutManager.getNextChildElements(BlockLayoutManager.java:141) at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:288) at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:113) at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:105) at org.apache.fop.layoutmgr.FlowLayoutManager.getNextChildElements(FlowLayoutManager.java:221) at org.apache.fop.layoutmgr.FlowLayoutManager.addChildElements(FlowLayoutManager.java:145) at org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:114) at org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:67) at org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements(PageBreaker.java:222) at org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:673) at org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:155) at org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:137) at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:387) at org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:90) at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:113) at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267) at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:128) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:347) at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:181) at com.icl.saxon.aelfred.SAXDriver.endElement(SAXDriver.java:792) at com.icl.saxon.aelfred.XmlParser.parseETag(XmlParser.java:1133) at com.icl.saxon.aelfred.XmlParser.parseContent(XmlParser.java:1217) at com.icl.saxon.aelfred.XmlParser.parseElement(XmlParser.java:1037) at com.icl.saxon.aelfred.XmlParser.parseContent(XmlParser.java:1222) at com.icl.saxon.aelfred.XmlParser.parseElement(XmlParser.java:1037) at com.icl.saxon.aelfred.XmlParser.parseDocument(XmlParser.java:510) at com.icl.saxon.aelfred.XmlParser.doParse(XmlParser.java:163) at com.icl.saxon.aelfred.SAXDriver.parse(SAXDriver.java:320) at com.icl.saxon.IdentityTransformer.transform(IdentityTransformer.java:59) at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:300) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130) at org.apache.fop.cli.Main.startFOP(Main.java:177) at org.apache.fop.cli.Main.main(Main.java:208)
--------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org