Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active October 29, 2021 16:20
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/c2182db9b010b3730854c3ececb71125 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/c2182db9b010b3730854c3ececb71125 to your computer and use it in GitHub Desktop.
Convert MS Project MPP Files to SVG Format using Java
// The path to the documents directory.
String dataDir = Utils.getDataDir(SaveAsSVG.class);
// Read the input Project file
Project project = new Project(dataDir + "Homemoveplan.mpp");
// Save the Project as SVG
project.save(dataDir + "Project5.SVG", SaveFileFormat.SVG);
// The path to the documents directory.
String dataDir = Utils.getDataDir(SaveAsSVG.class);
//Read the input Project file
Project project = new Project(dataDir + "Homemoveplan.mpp");
// Initialize the SvgOptions class
SaveOptions opt = new SvgOptions();
opt.setFitContent(true);
opt.setTimescale(Timescale.ThirdsOfMonths);
// Save the MPP file as SVG
project.save(dataDir + "FileName5.svg", opt);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment