This article is meant to explain how to convert Visio to PDF in C#. It contains the step-by-step guide and the code snippet to convert Visio to PDF without Visio in C#. You can load the input file in VSD or VSDX format and export it to a PDF document with a few API calls.
Steps to Convert Visio to PDF using C#
- Configure the environment to use Aspose.Diagram for .NET into the Visio conversion project
- Load the input Visio file with the Diagram class for conversion to PDF
- Initialize the PdfSaveOptions class object
- Set different properties like page count and page index
- Save the output PDF file
These steps explain the whole process to create a Visio to PDF converter in C#. Load the input Visio file and set different properties for the required PDF document like the page count to mention the total number of pages to render and page index to mention the starting page index in the source VSD file. Finally, write the created PDF file to a stream or the disk based on your requirements.
Code to Convert Visio to PDF in C#
This code sample demonstrates the feature to export Visio to PDF in C#. It is an example of a basic conversion scenario that you can modify to set other properties like digital signature, font, encryption, and many other options. Furthermore, you do not need to configure Microsoft Visio or any other tool to perform this conversion in your application.
This tutorial has covered the information about how to save Visio as PDF in C#. If you are interested to learn VSX to HTML conversion, read the article on how to convert VSX to HTML in C#.