Convert Microsoft Project MPP file to SVG
Contents
[
Hide
Show
]Scalable Vector Graphics (SVG) is an Extensible Markup Language (XML)-based vector image format for two-dimensional graphic. Aspose.Tasks for .NET allows the user to render project’s view to graphical format This article shows how to convert MS Project MPP file to SVG format using Aspose.Tasks for .NET.
Saving a Project as SVG
The Project class exposes the Save method which is used to save a project in various formats. The Save method allows you to render project data to SVG format using the SaveFileFormat enumeration type.
To save a project to SVG:
- Load a Microsoft Project file.
- Save the project to SVG using SaveFileFormat.SVG.
The following lines of code show how to achieve this using C#.
1Project project = new Project("New Project.mpp");
2project.Save("SaveProjectAsSVG_out.SVG", SaveFileFormat.SVG);
1Project project = new Project("New Project.mpp");
2SaveOptions options = new SvgOptions();
3options.FitContent = true;
4options.Timescale = Timescale.ThirdsOfMonths;
5project.Save("UseSvgOptions_out.svg", options);