Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/acd3930d16b0904f7b1594b424abebfd to your computer and use it in GitHub Desktop.
Save aspose-com-gists/acd3930d16b0904f7b1594b424abebfd to your computer and use it in GitHub Desktop.
Convert MS Project MPP Files to SVG Format using C#
// Load the MPP file
Project project = new Project("SourceDirectory\\Tasks\\project_test.mpp");
// Save the MPP file as SVG
project.Save("OutputDirectory\\SaveProjectAsSVG_out.SVG", SaveFileFormat.SVG);
// Load the MPP file
Project project = new Project("SourceDirectory\\Tasks\\project_test.mpp");
// Initialize the SaveOptions class
SaveOptions options = new SvgOptions();
options.FitContent = true;
options.Timescale = Timescale.ThirdsOfMonths;
// Save the MPP file as SVG
project.Save("OutputDirectory\\UseSvgOptions_out.svg", options);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment