Embed SVG into PDF programmatically in .NET C#

后端 未结 3 484
别跟我提以往
别跟我提以往 2021-01-18 07:17

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 lib

相关标签:
3条回答
  • 2021-01-18 07:40

    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.

    0 讨论(0)
  • 2021-01-18 07:41

    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 讨论(0)
  • 2021-01-18 07:47

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

    0 讨论(0)
提交回复
热议问题