aspose file tools
The moose likes Struts and the fly likes Problem with Batik Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Problem with Batik" Watch "Problem with Batik" New topic
Author

Problem with Batik

Velika Srbija
Ranch Hand

Joined: Jan 15, 2002
Posts: 171
I encountered a problem with rendering SVGGraphics2D content.
Here is the code snippet:
-----------------------------------------------------------
DOMImplementation domImpl = SVGDOMImplementation.getDOMImplementation();
String svgNamespaceURI = SVGDOMImplementation.SVG_NAMESPACE_URI;
Document document = domImpl.createDocument(svgNamespaceURI, "svg", null);
Element root = document.getDocumentElement();
root.setAttributeNS(null, "width", "450");
root.setAttributeNS(null, "height", "500");
SVGGraphics2D svgGenerator = new SVGGraphics2D(document);
svgGenerator.stream(new java.io.OutputStreamWriter(System.out, "UTF-8"), true);
-----------------------------------------------------------
The problem is that there are no "width" and "height" attributes in the root element "svg" of the generated DOM tree.
What is goin' on?
No errors, no exceptions, but they are missing.?
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Problem with Batik
 
Similar Threads
Parsing an XML Document containing Namesapces using XPath and Xalan
Adding Node to XML document
batik SVG object under tomcat gets: Gtk-WARNING **: cannot open display:
How to define multiple namespaces using DOM?
Populating ENTITY tag using batik