Convert Microsoft Project MPP file to PNG

[ Hide Show ]

PNG or Portable Network Graphics is a raster-graphics file format that supports lossless data compression. Aspose.Tasks for .NET API lets you save project data to PNG file format.

Exporting Project Data to PNG

To save a project to PNG programmatically using Aspose.Tasks for .NET:

  1. Load a Microsoft Project MPP file.
  2. Optionally make changes to the loaded project.
  3. Save the project to PNG using one of Project.Save method overloads. Your can pass either SaveFileFormat.PNG to save project with default settings or pass ImageSaveOptions to customize export options.

The following article describes properties common for all graphical formats.

The code example given below demonstrates how to export your project data to PNG.

1Project project = new Project("New Project.mpp");
3// in order to manipulate JPEG quality one can use ImageSaveOptions.JpegQuality property.
4// The allowed value range is 0..100.
5ImageSaveOptions options = new ImageSaveOptions(SaveFileFormat.JPEG) { JpegQuality = 50 };
7project.Save("image_out.jpeg", (SaveOptions)options);
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.