Microsoft® Visio Formats Conversion Via C#

Convert MS Visio Diagrams to PDF, HTML and Images including BMP, JPG, PNG, TIFF to build cross-platform .NET applications.


For any solution, designing flowcharts and business flow diagrams etc or whenever there is need to handle MS Visio diagrams with in the applocation. So there is need to parse Visio formats as well as convert to other formats. .NET Visio API can facilitate all this. API not only create, read and manipulate Visio files but also converts to images, PDF and HTML formats.

Inter Conversion Visio Files

Visio files such as VSDX, VSX, VTX, VDX, VSSX, VSTX, VSDM, VSSM, VSTM can be inter converted with just few lines of C# code. Let’s consider the case of VSD to VSDX conversion. API provides a Diagram class to load the source VSD file. After loading the file, Call the Save method with output path with VSDX file name and SaveFileFormat .targetFile extension as parameters.

C# Code for VSD to VSDX Conversion

Visio Formats to Images Conversion

Whenever there is need to convert Microsoft® Visio files to Images including JPG, PNG, BMP, TIFF and SVG. API makes it easy and conversion process is same. Use the Diagram class to load the file and calling the save method by providing image name with full path and SaveFileFormat as parameters. For specific image setting API provides ImageSaveOptions class .

C# Code to Convert Visio to Image Formats

Convert Visio Files to PDF

API is capable of converting visio formats to PDF. Process of conversion is simple. Load the file using Diagram class. Create a Memostream object and save the visio file as PDF into stream using Save method having stream object and SaveFileFormat.PDF as parameters. Create a FileStream Object for the converted file to save it using MemoryStream.WriteTo(FileStream) method.

C# Code for Visio to PDF Conversion