开发者

Embed SVG into PDF programmatically in .NET C#

开发者 https://www.devze.com 2023-03-16 14:09 出处:网络
Does anyone know how to create a pdf with C# and add a SVG document inside of this PDF ? itextsharp can\'t do it.

Does anyone know how to create a pdf with C# and add a SVG document inside of this PDF ?

itextsharp can't do it.

I convert SVG into image thanks to this library (http://svg.codeplex.com/) but开发者_JAVA技巧 I need to keep vectorial graphic because image is pixelised.

Anyone know a library to do it ?

Thanks,


PrinceXML does a very good job of handling SVG, however, it is not completely free, meaning that the free version puts a small logo on the output PDF. You can find out more here: http://www.princexml.com/doc/7.0/svg/

PDFJet will allow you to create lines, circles, polygons, and other primitive drawing tools. You could create a class to parse your SVG and then draw the appropriate circles, arcs, lines, etc and use PDFJet to make the PDF. PDFJet can be downloaded here: http://pdfjet.com/os/edition.html

Other then that, I don't think there are many other options for what you are looking to do.


PDFKit.NET3 can insert the SVG document into PDF, while preserving vectors.


webSupergoo ABCpdf is also a good commercial option, a bit less pricey (ABCpdf Std costs $329, and ABCpdf Pro cost $479 if you want rendering or x64 support). Version 7 did a terrible job when handling SVG files (it could only load a small subset, often with issues), but I understand (haven't test it first hand) that version 8 (and now 9) greatly improved its SVG support by switching to the Gecko engine.

0

精彩评论

暂无评论...
验证码 换一张
取 消