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

Bewerk POTX eigenschappen met C++

Bouw uw eigen C++-apps om ingebouwde en aangepaste eigenschappen in presentatiebestanden aan te passen met behulp van server-side API’s.

Wijzig POTX eigenschappen via C++

Met Aspose.Slides for C++ kunnen ontwikkelaars de waarden van zowel ingebouwde als aangepaste eigenschappen openen en wijzigen. Ontwikkelaars kunnen de eigenschap DocumentProperties die door het presentatieobject wordt weergegeven, gebruiken om toegang te krijgen tot de documenteigenschappen van het presentatiebestand.

Wijzig POTX ingebouwde eigenschappen - 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);

Aangepaste eigenschappen toevoegen aan 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);

Metadata van POTX extraheren via C++

Dit zijn de stappen om metadata te extraheren uit POTX-bestanden.

  1. Maak een instantie van de Presentation-klasse met het pad naar het POTX-bestand

  2. Haal het DocumentProperties-object op dat is gekoppeld aan Presentation

  3. Loop over de items in het DocumentProperties-object

  4. Open en wijzig aangepaste eigenschappen

Andere ondersteunde metadataformaten

Met C++ kunt u ook metadata van vele andere indelingen manipuleren, waaronder.