Convert MPP to TIFF using Java

Microsoft Project creates projects in MPP format. It allows creating, organizing, tracking, and maintaining projects. An MPP file contains information about Project tasks, resources, assignments, timelines, budgets, and more. Programmatically, we can export project data from MPP files to multipage TIFF images. In this article, we will learn how to convert MPP to TIFF in Java.

The following topics shall be covered in this article:

  1. Java MPP to TIFF Converter API
  2. Convert MPP to TIFF
  3. Convert MPP to TIFF With Compression
  4. Remove Compression and Convert MPP to TIFF

Java MPP to TIFF Converter API

We will be using the Aspose.Tasks for Java API for converting the MPP file to TIFF. The API allows reading and writing the supported file formats without requiring Microsoft Project to be installed. Moreover, it allows converting and saving MPP files.

The Project class of the API represents a project. It provides the save(string, SaveFileFormat) method that saves the project data to the file in a specified file format. The API provides the SaveFileFormat enumeration for saving project format selection. We can also specify the additional image save options when rendering project pages to TIFF using the ImageSaveOptions class.

Please either download the JAR of the API or add the following pom.xml configuration in a Maven-based Java application.

<repository>
    <id>AsposeJavaAPI</id>
    <name>Aspose Java API</name>
    <url>https://releases.aspose.com/java/repo/</url>
</repository> 
 <dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-tasks</artifactId>
    <version>22.10</version>
</dependency>

Convert MPP to TIFF using Java

We can easily export the project data from the MPP file into a TIFF by following the steps given below:

  • Load the MPP file using the Project class.
  • Save as a TIFF using the save() method. It takes the output TIFF file path and the SaveFileFormat as arguments.

The following sample code shows how to convert MPP to TIFF in Java.

Convert MPP to TIFF With Compression using Java

We can apply compression while converting MPP to TIFF by following the steps given below:

  1. Firstly, load the MPP file using the Project class.
  2. Next, create an instance of the ImageSaveOptions class.
  3. After that, specify the TiffCompression.
  4. Finally, call the save() method. It takes the output TIFF file path and the SaveOptions as arguments.

The following sample code shows how to convert MPP to TIFF with compression in Java.

Remove Compression and Convert MPP to TIFF using Java

We can also remove the compression and then convert MPP to TIFF by following the steps mentioned above. However, we just need to set the TiffCompression as TiffCompression.None in step # 3.

The following sample code shows how to remove compression and convert MPP to TIFF in Java.

Get a Free License

You can get a free temporary license to try the library without evaluation limitations.

Conclusion

In this article, we have learned how to load an MPP file and convert into TIFF in Java. We have also seen how to specify image saving options and set compression while saving as TIFF programmatically. Besides, you can learn more about Aspose.Note for Java API using documentation. In case of any ambiguity, please feel free to contact us at our free support forum.

See Also