C# SVG从web表单到打印c?如何

C# SVG从web表单到打印c?如何,c#,asp.net,svg,C#,Asp.net,Svg,我的asp.net页面中有svg代码 <svg width="580" height="400" xmlns="http://www.w3.org/2000/svg"> <g> <title>background</title> <rect fill="#fff" id="canvas_background" height="402" width="582"y="-1"x="-1"/> <g d

我的asp.net页面中有svg代码

<svg width="580" height="400" xmlns="http://www.w3.org/2000/svg">

  <g>
    <title>background</title>
     <rect fill="#fff" id="canvas_background" height="402" width="582"y="-1"x="-1"/>

     <g display="none" overflow="visible" y="0" x="0" height="100%"width="100%"id="canvasGrid">

      <rect fill="url(#gridpattern)" stroke-width="0" y="0" x="0" height="100%" 
   width="100%"/>
    </g>
   </g>
  <g>
  <title>Layer 1</title>
 <path id="svg_1" 
 d="m112.9375,236.28002l18.375,-92.00001l61.25,0l18.37499,92.00001l-98,0z" 
 stroke-width="1.5" stroke="#000" fill="#fff"/>
 <path id="svg_2" d="m265.17247,210.49499l0,-109l101.00002,109l-
 101.00002,0z" stroke-width="1.5" stroke="#000" fill="#fff"/>
</g>
</svg>

现在,我想使用c将其打印为pdf或png,有什么方法吗?

在Web服务器上安装PhantomJS,并使用rasterize.js将SVG或HTML代码呈现为服务器上的pdf格式。

我需要类似的代码,但它没有集成