Convert MPP to PDF

Microsoft Project Files (MPP) are used for different project management tasks like tracking and organizing projects. You can convert MPP files to PDF documents programmatically using Java. The following sections explain MPP file conversion in detail:

MPP to PDF Converter – Java API Installation

Aspose.Tasks for Java can be used to manage projects in your Java applications. You can configure the API by downloading the JAR file from the Downloads section. Alternatively, you can specify the following Maven configurations in the pom.xml file of your Java project.

Repository:

<repository>
    <id>AsposeJavaAPI</id>
    <name>Aspose Java API</name>
    <url>http://repository.aspose.com/repo/</url>
</repository>

Dependency:

<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-tasks</artifactId>
    <version>21.2</version>
    <classifier>jdk18</classifier>
</dependency>

Convert MPP to PDF File Programmatically with Java

You can convert MPP file to PDF with the following steps:

  1. Load input file using Project class.
  2. Save output PDF file using Save()) method and SaveFileFormat enumeration.

The following code shows how to convert MPP file to PDF programmatically using Java:

MPP to PDF Conversion with Advanced Options in Java

You can customize and control the MPP to PDF file conversion with several properties exposed by the PdfSaveOptions class. For instance, you can specify legends, time scale, row height, etc. The following steps show how to perform MPP file conversion to PDF format:

  1. Load input Microsoft Project File.
  2. Initialize SaveOptions class object.
  3. Specify different properties.
  4. Save output PDF document.

The following code shows how to convert MPP to PDF with advanced options programmatically using Java:

Convert MPP file to Encrypted and Password Protected PDF File using Java

Some projects may include sensitive data for an organization so you may prefer to protect the information in output PDF file. So you can encrypt and password protect the PDF document. Please follow the steps below to secure output PDF file after MPP conversion:

  1. Load input MPP file with Project class.
  2. Initialize PdfEncryptionDetails class object while specifying user and owner passwords.
  3. Initialize PdfSaveOptions class object.
  4. Save the output PDF file.

The code below explains how to convert MPP file to a password protected and encrypted PDF file programmatically using Java:

Get Free API License

You can get free temporary license to evaluate the API in its full capacity.

Conclusion

In this article, you have explored how to convert MPP, Microsoft Project Files, to PDF programmatically using Java. You have learned how to save the output PDF files with advanced options or with encryption and password protection. You can explore further by visiting the Documentation or feel free to get in touch with us via the Free Support Forum.

See Also