PPT PPTX ODP POT ppsx
Aspose.Slides  for C++
PPS

C++ を使用して PPS プロパティを編集します

独自の C++ アプリを構築して、サーバー側 API を使用してプレゼンテーション ファイルの組み込みおよびカスタム プロパティを変更します。

C++ 経由で PPS プロパティを変更します

Aspose.Slides for C++ を使用すると、開発者は組み込みプロパティとカスタム プロパティの値にアクセスして変更できます。開発者は、プレゼンテーション オブジェクトによって公開される DocumentProperties プロパティを使用して、プレゼンテーション ファイルのドキュメント プロパティにアクセスできます。

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


// Instantiate the Presentation class that represents the Presentation
System::SharedPtr<Presentation> presentation = System::MakeObject<Presentation>(u"presentation.pps");

// Create a reference to IDocumentProperties object associated with Presentation
System::SharedPtr<IDocumentProperties> documentProperties = presentation->get_DocumentProperties();

// Set the builtin properties
documentProperties->set_Author(u"New Author");
documentProperties->set_Title(u"New Title");

// Save your presentation to a file
presentation->Save(u"DocumentProperties_out.pps", SaveFormat::Pps);

カスタム プロパティを PPS - C++ に追加


// Instantiate the Presentation class
auto presentation = System::MakeObject<Presentation>();

// Getting Document Properties
auto documentProperties = presentation->get_DocumentProperties();

// Adding Custom properties
documentProperties->idx_set(u"New Custom", ObjectExt::Box<int32_t>(12));
documentProperties->idx_set(u"My Name", ObjectExt::Box<String>(u"Aspose Metadata Editor"));
documentProperties->idx_set(u"Custom", ObjectExt::Box<int32_t>(124));

// Getting property name at particular index
String getPropertyName = documentProperties->GetCustomPropertyName(2);

// Removing selected property
documentProperties->RemoveCustomProperty(getPropertyName);

// Saving presentation
presentation->Save(u"CustomDocumentProperties_out.pps", SaveFormat::Pps);

C++ 経由で PPS のメタデータを抽出する方法

これらは、PPS ファイルからメタデータを抽出する手順です。

  1. PPS ファイルへのパスを使用してプレゼンテーション クラスをインスタンス化する

  2. プレゼンテーションに関連付けられた DocumentProperties オブジェクトを取得する

  3. DocumentProperties オブジェクト内のアイテムをループする

  4. カスタム プロパティへのアクセスと変更

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

C++ を使用すると、他の多くの形式のメタデータを操作することもできます。