Convert PDF Files to SVG using C#

PDF has become one of the dominant file formats because of its cross-platform support. Due to the consistent layout of the PDF documents across heterogeneous devices, people use to prefer conversion of documents to PDF before sharing. However, in certain cases, PDFs need to be converted into some other file format. PDF to SVG conversion is widely adopted in various scenarios i.e. in order to embed the content of PDF documents in webpages. Therefore, in this article, you will learn how to convert PDF files to SVG using C#.

C# PDF to SVG Converter API

Aspose.PDF for .NET is a PDF manipulation API that lets you create new and process existing PDF files from within .NET applications. In addition, the API also allows you to convert PDF files to SVG with high fidelity. You can either download the API’s DLL or install it via NuGet.

PM> Install-Package Aspose.Pdf 

Convert PDF Files to SVG using C#

The following are the steps to convert a PDF file to SVG using Aspose.PDF for .NET.

The following code sample shows how to convert a PDF file to SVG using C#.

Convert PDF to SVG with Additional Options

Aspose.PDF for .NET also provides some additional options to customize the PDF to SVG conversion. For this, the API provides SvgSaveOptions class that contains the following options.

The following are the steps to customize PDF to SVG conversion using SvgSaveOptions class.

The following code sample shows how to convert a PDF file to SVG with additional options using C#.

Get a Free API License

In case you want to try the API without evaluation limitations, you can get a free temporary license.

Conclusion

In this article, you have learned how to convert PDF files to SVG format using C#. Furthermore, the additional options to customize PDF to SVG conversion have been discussed with the code sample. You can explore more about the C# PDF API using documentation.

See Also