# مشاهده یا ویرایش فراداده فایل‌های PPTM با استفاده از Python

> کد منبع Python برای ویرایش یا مشاهده فراداده قالب PPTM.

Source: https://products.aspose.com/slides/fa/python-net/metadata/pptm/
Updated: 2023-04-25



## اصلاح ویژگی‌های PPTM از طریق Python

با استفاده از Aspose.Slides for Python via .NET، توسعه‌دهندگان می‌توانند به مقادیر ویژگی‌های داخلی و همچنین ویژگی‌های سفارشی دسترسی داشته باشند و آن‌ها را تغییر دهند. توسعه‌دهندگان می‌توانند از ویژگی [DocumentProperties](https://reference.aspose.com/slides/python-net/aspose.slides/documentproperties/) که توسط شی Presentation در معرض دید قرار می‌گیرد برای دسترسی به ویژگی‌های سند فایل ارائه استفاده کنند.

### اصلاح ویژگی‌های داخلی PPTM - Python

```py

import aspose.slides as slides

# Instantiate the Presentation class that represents the Presentation
with slides.Presentation(path + "ModifyBuiltinProperties.pptm") 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.pptm", slides.export.SaveFormat.PPTM)
```

### افزودن ویژگی های سفارشی به PPTM - Python

```py

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.pptm", slides.export.SaveFormat.PPTM)
```

## نحوه استخراج فراداده PPTM از طریق Python

این مراحل برای استخراج فراداده از فایل‌های PPTM است.

کلاس Presentation را با مسیر فایل PPTM نمونه سازی کنید

دریافت شی DocumentProperties مرتبط با Presentation

حلقه روی آیتم ها در شی DocumentProperties

دسترسی و اصلاح خواص سفارشی

## سایر فرمت های فراداده پشتیبانی شده
