Python で PPSX のメタデータを表示、編集

Aspose.Slides を使用して、プレゼンテーションの組み込みプロパティとカスタム プロパティを読み取り、変更する Python アプリを構築します。

Python で PPSX のメタデータを表示、変更

Aspose.Slides for Python via .NET を使用すると、PPSX プレゼンテーションの組み込みメタデータを読み取って更新し、カスタム ドキュメント プロパティを追加、更新、削除できます。Presentation.document_properties から IDocumentProperties オブジェクトにアクセスして変更し、プレゼンテーションを PPSX 形式で保存します。

PPSX の組み込みプロパティの更新 - Python

with slides.Presentation("presentation.ppsx") as presentation:
    document_properties = presentation.document_properties
    document_properties.author = "Aspose.Slides for Python"
    document_properties.title = "Quarterly Review"
    document_properties.subject = "Presentation Metadata"
    document_properties.comments = "Built-in properties updated with Aspose.Slides."
    document_properties.manager = "Project Manager"

    presentation.save("presentation_with_updated_metadata.ppsx", slides.export.SaveFormat.PPSX)

PPSX のカスタム プロパティの追加と削除 - Python

with slides.Presentation("presentation.ppsx") as presentation:
    document_properties = presentation.document_properties
    document_properties.set_custom_property_value("Department", "Engineering")
    document_properties.set_custom_property_value("Review Count", 3)
    document_properties.set_custom_property_value("Obsolete Status", "Draft")
    document_properties.remove_custom_property("Obsolete Status")

    presentation.save("presentation_with_custom_metadata.ppsx", slides.export.SaveFormat.PPSX)

Python で PPSX のメタデータを編集する方法

次の手順に従って、PPSX ファイルのメタデータを編集します。

  1. Presentation で PPSX ファイルを開きます。
  2. Presentation.document_properties から IDocumentProperties オブジェクトにアクセスします。
  3. 組み込みプロパティを更新するか、カスタム プロパティには set_custom_property_value と remove_custom_property を使用します。
  4. Presentation.save と SaveFormat.PPSX でプレゼンテーションを保存します。

Aspose.Slides で構築

PPSX のメタデータをオンラインで表示、編集

無料の Aspose.Slides Metadata アプリは、上記のコードと同じ API である Aspose.Slides for Python via .NET で構築されています。アプリを開いて、ご自身の PPSX ファイルで API に何ができるかをお確かめください。

  • ブラウザーで動作し、インストールは不要です。
  • コードを書く前に、Aspose.Slides がプロパティをどう読み書きするかを確認できます。
  • PPSX ファイルの組み込みプロパティとカスタム プロパティを表示、編集できます。
  • 更新したファイルを保存してダウンロードできます。

その他のサポートされているメタデータ形式

Python では、サポートされている他のプレゼンテーション形式のメタデータも管理できます。