This simple topic assists in how to convert MPP to SVG using C# by providing detailed configuration steps and a runnable simple code to perform the task. It identifies all the necessary resources that are required to develop this application without any dependence on MS Project or any other MPP managing software to export MS Project file to SVG using C# that results in the creation of a SVG file.
Steps to Convert MPP file to SVG using C#
- Set up the development environment to include Aspose.Tasks for .NET using the NuGet package manager
- Access an existing MPP file into the Project class object to convert to SVG
- Set the SaveOptions options to set the output SVG options
- Save the resultant project file as an SVG file on the disk
The aforementioned steps provide an easy way to convert MS Project file to SVG using C# by following a stepwise process and a runnable sample code. The process is commenced by loading the source MPP file from the disk and then using the SaveOptions class different options are set. Finally, the loaded MPP file is exported to SVG and saved on the disk.
Code to Convert MS Project to SVG using C#
In order to transform an MPP file to SVG using C#, you can access the source MPP file from the disk, however, you can also load the MPP file from the stream which allows loading from the sources like a database or from a web. The LoadOptions class can be used to set the password for opening a protected project file, set some cancellation token to interrupt the file loading operation, and set the error-handling routine for accessing some XML files. Similarly, the SvgOptions is used that expose the options like setting the BarStyles, CustomPageSize, Gridlines, TextStyles, Timescale and many more.
In this topic, we have learnt to convert MPP to SVG files. If you are interested in converting an MPP to Excel, follow the article on how to convert MPP to Excel using C#.