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
- Convert MPP to PDF File Programmatically with Java
- MPP to PDF Conversion with Advanced Options in Java
- Convert MPP file to Encrypted and Password Protected PDF File using Java
- Get Free API License
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:
- Load input file using Project class.
- 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:
- Load input Microsoft Project File.
- Initialize SaveOptions class object.
- Specify different properties.
- 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:
- Load input MPP file with Project class.
- Initialize PdfEncryptionDetails class object while specifying user and owner passwords.
- Initialize PdfSaveOptions class object.
- 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.