Microsoft Project MPP files are often used to manage complex projects. However, sometimes you need to share the project plan with others who may not have access to Microsoft Project. In such cases, converting the MPP file to a more widely used format like PDF can be helpful. PDF files are easily shareable, and they can be viewed on any device with a PDF reader.
- MPP to PDF Conversion – Python API Installation
- How to Convert MPP to PDF using Python
- Convert MPP to PDF in Python
MPP to PDF Conversion – Python API Installation
Aspose.Tasks for Python via .NET API can be used to work with Microsoft Project files. You can download package or install it from PyPI, the Python package manager. Open the command prompt and run the following pip command:
pip install aspose-tasks
How to Convert MPP to PDF using Python
You can convert MPP files to PDF by following the steps below:
- Load the input MPP file.
- Render the output PDF file.
Convert MPP to PDF in Python
You need to follow the steps below and make a couple of method calls to export MPP to PDF in Python.
- Load the input MPP file with the Project class.
- Save the output PDF file using the SaveFileFormat enumeration.
Here’s the Python code snippet to convert an MPP file to PDF:
import aspose.tasks as tasks
# Load input MPP file
project = tasks.Project("Input.mpp")
# Save output PDF file
project.save("MPPtoPDF.pdf", tasks.saving.SaveFileFormat.PDF);
Get a Free API License
You may obtain a free temporary license in order to evaluate the API without any limitations.
Conclusion
In conclusion, you have explored how to convert an MPP Microsoft Project file to a PDF document in Python. You can further explore different features by visiting the documentation section. to explore several other features offered by the API. In case of any concerns, please write to us at the free support forum.