Convert Primavera XER to PDF using Java

Oracle Primavera P6 uses the XER file format as a proprietary project file to store project data. The XER file is a text file that can be opened and edited with any text editor. XER files can be used to export multiple projects at once, and they are the only format that can be used to import and export roles in a Primavera project. PDF files are a popular format for documents because they are portable, secure, and can be viewed on any device. In this blog post, we will show you how to convert XER to PDF in Java.

This article covers the following topics:

  1. Java Tasks API to Convert XER to PDF
  2. Convert Primavera XER File to PDF
  3. Get a Free License
  4. XER to PDF Converter Online
  5. Free Learning Resources

Java Tasks API to Convert XER to PDF

We will use the Aspose.Tasks for Java API for converting Primavera XER file to a PDF file. It allows developers to work with Microsoft Project files in Java applications. Aspose.Tasks for Java provides a set of APIs and features to read, write, manipulate, and convert Microsoft Project files (MPP and XML formats) without the need for Microsoft Project to be installed on the system. It simplifies the integration of Microsoft Project file processing capabilities into Java applications, making it easier for developers to work with project management data programmatically.

Please 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 XER to PDF in Java

We can easily convert the Primavera P6 project from the XER file into a PDF by following the steps below:

  1. Load an existing XER file using the Project class.
  2. Create an instance of the PdfSaveOptions class.
  3. After that, define save options such as PageSize, etc.
  4. Finally, save the project as a PDF file using the save() method. It takes the output PDF file path and the PdfSaveOptions as arguments.

The following sample code shows how to convert Primavera XER to PDF in Java.

Convert Primavera P6 XER to PDF using Java

Convert Primavera P6 XER to PDF using Java.

Get a Free License

You can obtain a complimentary temporary license to test the library without any evaluation restrictions.

XER to PDF Converter Online

You may also convert XER files to PDF format using this free XER to PDF converter online tool, developed using the above API.

Convert XER to PDF – Free Learning Resources

Besides converting XER to PDF programmatically in Java, explore other library features using the following resources:

Conclusion

In this blog post, we have shown you how to convert an XER file to a PDF file in Java. By following the steps outlined in this article, you can easily develop your own XER to PDF converter application in Java. We hope this information was helpful. In case of any ambiguity, please feel free to contact us at our free support forum.

See Also