This tutorial explains how to convert PDF to SVG using C#. It contains the information to prepare the environment, followed by a sequence of steps and a code snippet for rendering PDF to vector image using C#. Moreover, you can improvise different properties to modify the output vector image as per your requirements.
Steps to Convert PDF to SVG using C#
- Prepare the environment to work with Aspose.PDF for .NET in your system
- Load the input PDF with the Document class to create its SVG image
- Create an object of SvgSaveOptions class
- Save the output SVG image
These steps present a complete overview of the process to transform from PDF to SVG using C#. You only need to load the source PDF file, set preferences for the output SVG file, and render it as a vector image to the disk or a stream. These basic steps do not require any in-depth knowledge of the file formats as the process is straightforward and simple to follow.
Code to Change PDF to SVG using C#
The above code snippet shows how to convert PDF to SVG using C#. You can use any constructor of the Document class to load the source PDF file, then create an instance of SvgSaveOptions class and render the output vector graphics. Whereas, you can set custom properties like compressing the output to a zip archive, scaling to pixels, merging images with similar backgrounds, etc. depending on your requirements.
This article has demonstrated to export PDF to SVG using C#. However, if you want to explore PDF to XPS rendering then read the article on how to convert PDF to XPS using C#.