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

Bewerk OTP 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 OTP 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 OTP ingebouwde eigenschappen - C++


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

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

Aangepaste eigenschappen toevoegen aan OTP - 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.otp", SaveFormat::Otp);

Metadata van OTP extraheren via C++

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

  1. Maak een instantie van de Presentation-klasse met het pad naar het OTP-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.