Hi everybody,

I'm tring to involve a generated svg into a fop-document. but i still get an
error.
The svg is created by JFreeChart like this:

JFreeChart chart = ChartFactory.createPieChart(
          getChartTitle(),                      // chart title
          dataset,                              // data
          false,                                // include legend
          true,
          false
);
DOMImplementation domImpl= GenericDOMImplementation.getDOMImplementation();
Document document=domImpl.createDocument(null,"svg",null);
SVGGraphics2D svgGenrator=new SVGGraphics2D(document);
chart.draw(svgGenrator,new Rectangle2D.Double(0,0,400,300),null);
Writer writer=new OutputStreamWriter(new FileOutputStream(new
File("test.svg")),"UTF-8");
svgGenrator.stream(writer,true);

And my attempt to include this into a fop looks like this:

<fo:block>
        <fo:instream-foreign-object>
            <svg:svg width="170mm" height="130mm"
xmlns:xlink="http://www.w3.org/2000/svg";>
                <svg:image width="170mm" height="130mm"
link:href="test.svg"/></svg:image>
            </svg:svg>
       </fo:instream-foreign-object>
</fo:block>

But when I wants to generate the pdf I get this error: [Fatal Error]
:1:32817: The prefix "svg" for element "svg:svg" is not bound.
System-ID unbekannt; Zeilennummer1; Spaltennummer32817;
org.xml.sax.SAXParseException: The prefix "svg" for element "svg:svg" is not
bound.

Can somebody help me?
Thanks in advance!
-- 
View this message in context: 
http://www.nabble.com/how-to-embed-svg-to-fop--tf4841833.html#a13852537
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to