PPT PPTX ODP POT ppsx
Aspose.Slides  for Python via .NET
PPSM

Edit PPSM properties using Python

Build your own Python apps to modify Built-in and Custom properties in presentation files using server-side APIs.

Modify PPSM Properties via Python

Using Aspose.Slides for Python via .NET, developers can access and modify the values of built-in properties as well as custom properties. Developers can use DocumentProperties property exposed by Presentation object to access the document properties of the presentation file.

Modify PPSM Built-in Properties - Python


import aspose.slides as slides

# Instantiate the Presentation class that represents the Presentation
with slides.Presentation(path + "ModifyBuiltinProperties.ppsm") as presentation:
    # Create a reference to object associated with Presentation
    documentProperties = presentation.document_properties

    # Set the builtin properties
    documentProperties.author = "Aspose.Slides for Python"
    documentProperties.title = "Modifying Presentation Properties"
    documentProperties.subject = "Aspose Subject"
    documentProperties.comments = "Aspose Description"
    documentProperties.manager = "Aspose Manager"

    # save your presentation to a file
    presentation.save("DocumentProperties_out.ppsm", slides.export.SaveFormat.PPSM)

Add Custom Properties to PPSM - Python


import aspose.slides as slides

# Instantiate the Presentation class
with slides.Presentation() as presentation:
    # Getting Document Properties
    documentProperties = presentation.document_properties

    # Adding Custom properties
    documentProperties.set_custom_property_value("New Custom", 12)
    documentProperties.set_custom_property_value("My Nam", "Aspose Metadata Editor")
    documentProperties.set_custom_property_value("Custom", 124)

    # Getting property name at particular index
    getPropertyName = documentProperties.get_custom_property_name(2)

    # Removing selected property
    documentProperties.remove_custom_property(getPropertyName)

    # Saving presentation
    presentation.save("CustomDocumentProperties_out.ppsm", slides.export.SaveFormat.PPSM)

How to Extract Metadata of PPSM via Python

These are the steps to Extract Metadata from PPSM files.

  1. Instantiate the Presentation class with path to PPSM file

  2. Get DocumentProperties object associated with Presentation

  3. Loop over the items in DocumentProperties object

  4. Access and modify custom properties

Other Supported Metadata Formats

Using Python, You can also manipulate metadata of many other formats including.