PPT
PPTX
ODP
POT
ppsx
PPTX
Измените свойства PPTX, используя Python
Создавайте собственные приложения Python для изменения встроенных и настраиваемых свойств в файлах презентаций с помощью серверных API.
Измените свойства PPTX через Python
Используя Aspose.Slides for Python via .NET, разработчики могут получать доступ и изменять значения как встроенных, так и пользовательских свойств. Разработчики могут использовать свойство DocumentProperties , предоставляемое объектом Presentation, для доступа к свойствам документа файла презентации.
Изменить встроенные свойства PPTX – Python
import aspose.slides as slides
# Instantiate the Presentation class that represents the Presentation
with slides.Presentation(path + "ModifyBuiltinProperties.pptx") 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.pptx", slides.export.SaveFormat.PPTX)
Добавить пользовательские свойства в PPTX – 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.pptx", slides.export.SaveFormat.PPTX)
Как извлечь метаданные PPTX через Python
Это шаги для извлечения метаданных из файлов PPTX.
- Создайте экземпляр класса Presentation с путем к файлу PPTX 
- Получить объект DocumentProperties, связанный с презентацией 
- Перебрать элементы в объекте DocumentProperties 
- Доступ и изменение пользовательских свойств