Hi Thomas, > I don't think Batik supports Base64 encoded SVG images. So I would > suggest replacing the 'image' element with an 'svg' element (or perhaps > better a use element) and append the contents of the reference SVG image > to the 'svg' element (or a 'symbol' element you construct in the defs).
Changing 'image' element to 'svg' will affect lot of places in my code. so i have forced to use the alternate option with SVGGraphics2D. But when use the following code to export to SVG file, it is not exporting properly. It means it contains only svg tag(<svg ...> </svg>). DOMImplementation impl = SVGDOMImplementation.getDOMImplementation(); final Document svgDoc = DOMUtilities.deepCloneDocument(_document, impl); SVGGeneratorContext ctx = SVGGeneratorContext.createDefault(svgDoc); SVGGraphics2D svgG2d = new SVGGraphics2D(ctx, false); svgG2d.setSVGCanvasSize(new Dimension(_width, _height)); Element root = svgDoc.getDocumentElement(); svgG2d.getRoot(root); svgG2d.stream(fileName, useCSS); svgG2d.dispose(); So please clarify how to export to SVG file using SVGGraphics2D. Thanks, Sudhakar -- View this message in context: http://www.nabble.com/Exporting-to-SVG-problem-tf2013573.html#a5589247 Sent from the Batik - Users forum at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
