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

Bewerk PPSM eigenschappen met Python

Bouw uw eigen Python-apps om ingebouwde en aangepaste eigenschappen in presentatiebestanden aan te passen met behulp van server-side API’s.

Wijzig PPSM eigenschappen via Python

Met Aspose.Slides for Python via .NET kunnen ontwikkelaars de waarden van zowel ingebouwde als aangepaste eigenschappen openen en wijzigen. Ontwikkelaars kunnen de eigenschap DocumentProperties die door het presentatieobject wordt weergegeven, gebruiken om toegang te krijgen tot de documenteigenschappen van het presentatiebestand.

Wijzig PPSM ingebouwde eigenschappen - 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)

Aangepaste eigenschappen toevoegen aan 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)

Metadata van PPSM extraheren via Python

Dit zijn de stappen om metadata te extraheren uit PPSM-bestanden.

  1. Maak een instantie van de Presentation-klasse met het pad naar het PPSM-bestand

  2. Haal het DocumentProperties-object op dat is gekoppeld aan Presentation

  3. Loop over de items in het DocumentProperties-object

  4. Open en wijzig aangepaste eigenschappen

Andere ondersteunde metadataformaten

Met Python kunt u ook metadata van vele andere indelingen manipuleren, waaronder.