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

Edit properti POTX menggunakan C++

Bangun aplikasi C++ Anda sendiri untuk mengubah properti Bawaan dan Kustom dalam file presentasi menggunakan API sisi server.

Ubah Properti POTX melalui C++

Dengan menggunakan Aspose.Slides for C++, developer dapat mengakses dan mengubah nilai properti bawaan serta properti kustom. Pengembang dapat menggunakan properti DocumentProperties yang diekspos oleh objek Presentasi untuk mengakses properti dokumen dari file presentasi.

Modifikasi POTX Properti Bawaan - C++


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

// 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.potx", SaveFormat::Potx);

Tambahkan Properti Kustom ke POTX - 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.potx", SaveFormat::Potx);

Cara Mengekstrak Metadata POTX melalui C++

Ini adalah langkah-langkah untuk Mengekstrak Metadata dari file POTX.

  1. Buat instance kelas Presentasi dengan jalur ke file POTX

  2. Dapatkan objek DocumentProperties yang terkait dengan Presentasi

  3. Ulangi item dalam objek DocumentProperties

  4. Akses dan ubah properti khusus

Format Metadata Lain yang Didukung

Menggunakan C++, Anda juga dapat memanipulasi metadata dari banyak format lain termasuk.