0
我创建一个图表引擎,我所拥有的一切设置,其中一个GET请求返回SVG。我使用JFreeSVG(与蜡染非常相似)。我可以使用iframe和对象HTML标记呈现SVG。我想用一个img标签来创建svg图像,但它给了我一个空白的框。我已经搜遍了网络,却找不到任何东西,而你是我最后的希望。
这里是我的请求返回的内容的示例:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:jfreesvg="http://www.jfree.org/jfreesvg/svg" width="423" height="452" text-rendering="auto" shape-rendering="auto">
<rect x="0" y="0" width="423" height="452" style="fill: rgb(255,255,255); fill-opacity: 1.0" transform="matrix(1,0,0,1,0,0)" clip-path="url(#4989619974245clip-0)"/>
<g transform="matrix(1,0,0,1,0,0)">
<text x="8" y="446.14" style="fill: rgb(0,0,0); fill-opacity: 1.0; font-family: Tahoma; font-size: 9px; " clip-path="url(#4989619974245clip-0)">November 19, 2014</text>
<g style="fill: url(#4989619974245gp0); fill-opacity: 1.0; stroke: none" transform="matrix(1,0,0,1,0,0)" clip-path="url(#4989619974245clip-1)">
<rect x="5" y="8" width="386.62" height="412.27" style="stroke-width: 1.0;stroke: rgb(204,204,204);stroke-opacity: 1.0;; fill: none" transform="matrix(1,0,0,1,0,0)" clip-path="url(#4989619974245clip-0)"/>
</svg>