PPT
PPTX
ODP
POT
ppsx
OTP
Bewerk OTP 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 OTP 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 OTP ingebouwde eigenschappen - Python
import aspose.slides as slides
# Instantiate the Presentation class that represents the Presentation
with slides.Presentation(path + "ModifyBuiltinProperties.otp") 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.otp", slides.export.SaveFormat.OTP)
Aangepaste eigenschappen toevoegen aan OTP - 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.otp", slides.export.SaveFormat.OTP)
Metadata van OTP extraheren via Python
Dit zijn de stappen om metadata te extraheren uit OTP-bestanden.
- Maak een instantie van de Presentation-klasse met het pad naar het OTP-bestand 
- Haal het DocumentProperties-object op dat is gekoppeld aan Presentation 
- Loop over de items in het DocumentProperties-object 
- Open en wijzig aangepaste eigenschappen