PPT
PPTX
ODP
POT
ppsx
PPTX
Python을(를) 사용하여 PPTX 속성 편집
서버 측 API를 사용하여 프리젠테이션 파일의 기본 제공 속성과 사용자 정의 속성을 수정하려면 자신만의 Python 앱을 빌드하세요.
Python을 통해 PPTX 속성 수정
개발자는 Aspose.Slides for Python via .NET을(를) 사용하여 기본 제공 속성 및 사용자 지정 속성의 값에 액세스하고 수정할 수 있습니다. 개발자는 프레젠테이션 파일의 문서 속성에 액세스하기 위해 Presentation 개체에 의해 노출된 DocumentProperties 속성을 사용할 수 있습니다.
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)
Python을 통해 PPTX의 메타데이터를 추출하는 방법
다음은 PPTX 파일에서 메타데이터를 추출하는 단계입니다.
- PPTX 파일에 대한 경로를 사용하여 프레젠테이션 클래스를 인스턴스화합니다. 
- 프레젠테이션과 연결된 DocumentProperties 개체 가져오기 
- DocumentProperties 개체의 항목을 반복합니다. 
- 사용자 지정 속성 액세스 및 수정