I have several thousand d3 charts and my client wants to print them for a report. The client needs them in EPS. I have bought Illustrator to convert them but when I open the SVG file the formatting has disappeared. This holds even when I put the CSS into the html page itself and not externally. Is there any way I can turn CSS + SVG into an EPS?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I just tried this approach in my illustrator and it does honor the CSS declarations inside the <svg />
element.
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width=".." height=".." viewBox="..">
<style type="text/css">
<![CDATA[
polygon{
fill:none;
}
#myPath{
/*styles here*/
}
]]>
</style>
<!-- SVG content -->
</svg>
I was then able to save my SVG as an EPS with the CSS styles applied.