Can I turn SVG and external CSS into EPS?

僤鯓⒐⒋嵵緔 提交于 2019-12-11 13:31:04

问题


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.



来源:https://stackoverflow.com/questions/34926050/can-i-turn-svg-and-external-css-into-eps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!