DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=35515>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=35515 Summary: Problem with converting WMF files to SVG Documents Product: Batik Version: 2.0 Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: SVGGraphics2D AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] It seems not possible to convert directly WMF files to SVG Documents. An Exception is explicitely raised in WMFTranscoder if trying to do so. Further, if trying to removed this Exception raising, the resulting SVG Document has no content, appart for the svg root Element. The cause of this problem seems in fact to be the getRoot() method in the SVGGraphics2D class : the code is simply : public Element getRoot(){ return getRoot(null); } which calls in the same class : public Element getRoot(Element svgRoot) { svgRoot = domTreeManager.getRoot(svgRoot); ... return svgRoot; } The DOMTreemanager creates a new svg Element in the tree, even if it already exists. I think the code in SVGGraphics2D should be something like that : public Element getRoot(){ Document doc = getDOMFactory(); Element elt = doc.getDocumentElement(); if (elt.getTagName().equals(SVGConstants.SVG_SVG_TAG)) return getRoot(elt); else { NodeList list = elt.getElementsByTagName(SVGConstants.SVG_SVG_TAG); if ((list == null) || (list.getLength() == 0)) return getRoot(null); else return getRoot((Element)(list.item(0))); } return getRoot(null); } -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
