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

แก้ไขคุณสมบัติ PPSX โดยใช้ Python

สร้างแอป Python ของคุณเองเพื่อแก้ไขคุณสมบัติในตัวและคุณสมบัติกำหนดเองในไฟล์งานนำเสนอโดยใช้ API ฝั่งเซิร์ฟเวอร์

แก้ไขคุณสมบัติ PPSX ผ่าน Python

เมื่อใช้ Aspose.Slides for Python via .NET นักพัฒนาสามารถเข้าถึงและแก้ไขค่าของคุณสมบัติในตัวรวมถึงคุณสมบัติที่กำหนดเอง นักพัฒนาสามารถใช้คุณสมบัติ DocumentProperties ที่เปิดเผยโดยออบเจกต์การนำเสนอเพื่อเข้าถึงคุณสมบัติเอกสารของไฟล์การนำเสนอ

แก้ไข PPSX คุณสมบัติในตัว - Python


import aspose.slides as slides

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

เพิ่มคุณสมบัติที่กำหนดเองใน PPSX - 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.ppsx", slides.export.SaveFormat.PPSX)

วิธีดึงข้อมูลเมตาของ PPSX ผ่าน Python

นี่คือขั้นตอนในการดึงข้อมูลเมตาจากไฟล์ PPSX

  1. สร้างอินสแตนซ์ของคลาสงานนำเสนอด้วยพาธไปยังไฟล์ PPSX

  2. รับวัตถุ DocumentProperties ที่เกี่ยวข้องกับการนำเสนอ

  3. วนซ้ำรายการในวัตถุ DocumentProperties

  4. เข้าถึงและแก้ไขคุณสมบัติแบบกำหนดเอง

รูปแบบ Metadata อื่นๆ ที่รองรับ

เมื่อใช้ Python คุณยังสามารถจัดการข้อมูลเมตาของรูปแบบอื่นๆ ได้อีกมากมาย เช่น