This tutorial elaborates on the process of rendering MPP to PDF in Python. It covers the IDE configuration information, stepwise algorithm, and working code snippet to convert MPP file to PDF in Python. Moreover, it discusses customizing the generated PDF file by setting different properties.
Steps to Convert MPP to PDF in Python
- Set up the environment by installing Aspose.Tasks to export MPP to PDF
- Read the input MS Project file with the Project class instance
- Convert the Project file to PDF format by invoking the save method
These steps outline the whole process to export MS Project to PDF in Python. They provide all the relevant details to configure the environment and perform the MPP file conversion. Load the input file and render the output PDF file with just one method call while specifying PDF as the output file format.
Code to Export MS Project to PDF in Python
This sample code is sufficient to convert MPP to PDF in Python. It loads the input project file and renders it to PDF format by setting a value from the SaveFileFormat enumeration. You can customize it further by creating a PdfSaveOptions class object to set the PDF page size, setting the fonts, or the encryption of PDF files to meet your requirements.
This article has taught us to render MS Project to PDF in Python. To understand the conversion of an MPP file to Excel, read the article Convert MPP to Excel using Python.