DOMImplementation domImpl = GenericDOMImplementation.getDOMImplementation();
Document document = domImpl.createDocument(null, "svg", null);
SVGGraphics2D svgGenerator = new SVGGraphics2D(document);
svgGenerator.setBackground(Color.LIGHT_GRAY);
svgGenerator.setColor(Color.LIGHT_GRAY);
svgGenerator.fill(new Rectangle(0, 0, moleculewidth, moleculeheight));
renderer.paintMolecule(cdkmol, new AWTDrawVisitor(svgGenerator), drawArea, false);
boolean useCSS = false;
baos = new ByteArrayOutputStream();
Writer outwriter = new OutputStreamWriter(baos, "UTF-8");
StringBuffer sb = new StringBuffer();