Microsoft Project (MPP) files are powerful for project planning and scheduling, but not all stakeholders have access to MS Project software. Converting MPP files to PDF ensures that project data is preserved in a portable, universally accessible format. PDF documents are easy to share, print, and secure, making them ideal for project reporting.

MPP to PDF Conversion API

The GroupDocs.Conversion Cloud SDK for .NET provides developers with a seamless way to convert Microsoft Project files to PDF programmatically. This cloud-based solution requires no local MS Project installation and ensures accurate, fast, and scalable file conversions.

Benefits:

  • Convert MPP to PDF online with high fidelity.
  • Automate project file conversion in workflows.
  • Cloud-based, secure, and scalable solution.
  • Simple integration with C# .NET apps.

Install SDK via NuGet

Install the SDK in your .NET project using NuGet:

Install-Package GroupDocs.Conversion-Cloud

Then obtain your Client ID and Client Secret from the GroupDocs Cloud Dashboard.

Build an MPP to PDF Converter in C#

This section provides the details on how to export MS Project data into PDF format using C#:

  1. Create an instance of Configuration class using client credentials.
Configuration configuration = new Configuration(clientId, clientSecret);
  1. Secondly, initialize the ConvertApi while providing Configuration object as argument.
ConvertApi convertApi = new ConvertApi(configuration);
  1. Create an instance of ConvertSettings class where we specify the output format as pdf.
var settings = new ConvertSettings{...}
  1. Finally, call the ConvertDocumentRequest API to perform the MPP to PDF conversion.
var response = apiInstance.ConvertDocument(new ConvertDocumentRequest(settings));
mpp to pdf

Image:- A preview of MS Project to PDF conversion.

  • The sample MS Project used in the above example can be downloaded from Home move plan.mpp.

Save MS Project to PDF using cURL

For those who prefer working directly with the REST API, you can use cURL commands to perform MPP to PDF conversion online. The first step in this approach is to generate a JWT access token and once the token has been generated, please execute the following cURL command to save MPP to PDF format.

curl -v "https://api.groupdocs.cloud/v2.0/conversion" \
-X POST \
-H "accept: application/json" \
-H "authorization: Bearer {ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d "{  \"StorageName\": \"default\",  \"FilePath\": \"{inputMPP}\",  \"Format\": \"pdf\",  \"OutputPath\": \"{resultantPDF}\"}"

Replace:

  • inputMPP - name of input MS Project file.
  • resultantPDF - name of resultant PDF file.
  • ACCESS_TOKEN - JWT access token generated above.

Save to local drive If you prefer saving the resultant PDF on local drive, then please try using the following command:

curl -v "https://api.groupdocs.cloud/v2.0/conversion" \
-X POST \
-H "accept: application/json" \
-H "authorization: Bearer {accessToken}" \
-H "Content-Type: application/json" \
-d "{  \"StorageName\": \"default\",  \"FilePath\": \"{sourceFile}\",  \"Format\": \"pdf\"}" \
-o "output.pdf"

Free Online MPP to PDF Converter

Not ready to code yet? Try the free MPP to PDF Converter App to quickly test the functionality online.

mpp to pdf converter app

Conclusion

Converting MPP to PDF using GroupDocs.Conversion Cloud SDK for .NET is a reliable, automated, and scalable solution for project reporting and data sharing. Whether you need a one-time conversion or an enterprise-level automation, this API ensures accuracy, portability, and ease of use.

Useful Resources

We also suggest going through the following links to learn more about: