Hello *
Generating SVG works properly at my place (Windows 2000)
What I do is:
----------------------8<---------------------------------------------
import org.apache.batik.svggen.SVGGraphics2D;
import org.apache.batik.dom.GenericDOMImplementation;
import org.w3c.dom.Document;
import org.w3c.dom.DOMImplementation;
//...
public static void toSVG(JGraph graph, Writer out) throws Exception {
DOMImplementation domImpl =
GenericDOMImplementation.getDOMImplementation();
// Create an instance of org.w3c.dom.Document
Document document = domImpl.createDocument(null, "svg", null);
// Create an instance of the SVG Generator
SVGGraphics2D svgGenerator = new SVGGraphics2D(document);
// Render into the SVG Graphics2D implementation
graph.paint(svgGenerator);
// Use CSS style attribute
boolean useCSS = true;
// Finally, stream out SVG to the writer
svgGenerator.stream(out, useCSS);
}
----------------------8<---------------------------------------------
What I get, is a properly good SVG file, but with an encoding such that
it cannot be imported, neither into the ADOBE PlugIn of Mozilla nor into
IE.
The encoding is the following:
<?xml version="1.0" encoding="Cp1252"?>
How can I switch to another encoding before creating my file?
(ISO-8859-1 works with ADOBE, but UTF8 does not work either)
Klaus
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]