C++ で PPSX のメタデータを編集

Aspose.Slides for C++ を使用して、プレゼンテーション ファイルの組み込みプロパティとカスタム プロパティを表示、更新します。

C++ で PPSX のプロパティを変更

Aspose.Slides for C++ を使用すると、Microsoft PowerPoint なしで PPSX ファイルのメタデータを読み取り、更新できます。Presentation::get_DocumentProperties が返す DocumentProperties オブジェクトを使用して、Author や Title などの組み込みプロパティを変更したり、idx_set、GetCustomPropertyName、RemoveCustomProperty でカスタム プロパティを管理したりできます。

PPSX の組み込みプロパティの変更 - C++

auto presentation = MakeObject<Presentation>(u"presentation.ppsx");
auto documentProperties = presentation->get_DocumentProperties();

documentProperties->set_Author(u"New Author");
documentProperties->set_Title(u"New Title");

presentation->Save(u"updated-presentation.ppsx", SaveFormat::Ppsx);
presentation->Dispose();

PPSX へのカスタム プロパティの追加 - C++

auto presentation = MakeObject<Presentation>(u"presentation.ppsx");
auto documentProperties = presentation->get_DocumentProperties();

documentProperties->idx_set(u"Department", ObjectExt::Box<String>(u"Sales"));
documentProperties->idx_set(u"Project", ObjectExt::Box<String>(u"Metadata Update"));
documentProperties->idx_set(u"Revision", ObjectExt::Box<int32_t>(3));

auto customPropertyName = documentProperties->GetCustomPropertyName(2);
documentProperties->RemoveCustomProperty(customPropertyName);

presentation->Save(u"updated-custom-properties.ppsx", SaveFormat::Ppsx);
presentation->Dispose();

C++ で PPSX のメタデータを表示または編集する方法

次の手順に従って、PPSX のメタデータを表示または編集します。

  1. Presentation クラスで PPSX ファイルを読み込みます。
  2. get_DocumentProperties で DocumentProperties オブジェクトを取得します。
  3. Author や Title などの組み込みプロパティを読み取るか更新します。
  4. idx_set、GetCustomPropertyName、RemoveCustomProperty でカスタム プロパティを追加、読み取り、削除します。

Aspose.Slides で構築

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

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

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

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

C++ では次の形式のメタデータも管理できます。