This simple article focuses on how to access the Presentation properties in Python by covering all the step-wise configurations and details to set up the environment and use the sample code. The application to read PPTX document properties in Python is fairly easy and can be used in any of the .NET Core and Python-supported applications running either in Windows, Linux, or macOS.
Steps to Read PPTX Document Properties in Python
- Set up the IDE environment to use Aspose.Slides for Python via .NET to read the presentation properties
- Initialize the object of the IPresentationInfo class to access the presentation info collection from the presentation factory
- Create an IDocumentProperties class object to fetch the presentation document properties from the presentation info instance
- Access and print the document properties for the presentation
By performing the aforementioned steps in Python Presentation document properties can be fetched and managed using simple API calls. The process involves accessing the presentation information from the presentation factory as a first step. Then, by using an IDocumentProperties class object, the properties are read and the output is printed inside the console. You can also modify the existing document properties data by setting data for desired properties as per your requirements.
Code to Read Presentation Properties in Python
In this demonstrated code, you can easily read presentation properties in Python using a few API calls. When you access PresentationFactory class to load the presentation information, there is a very small memory footprint as the entire presentation is not loaded inside the API Document Object Model. The DocumentProperties class lets you access and modify the pre-defined presentation properties and also gives a provision to define and access the custom document properties.
This topic covers, how to read presentation properties using Python. If you want to learn about saving a presentation with slide notes to a PDF file, refer to the article on how to save PowerPoint slides with Notes as PDF in Python.