Can I turn SVG and external CSS into EPS?

2019-08-10 16:57发布

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条回答
爷、活的狠高调
2楼-- · 2019-08-10 17:32

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.

查看更多
登录 后发表回答