PPT PPTX ODP POT ppsx
Aspose.Slides  for .NET
OTP

Bewerk OTP eigenschappen met C#

Bouw uw eigen .NET-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 .NET 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
Presentation presentation = new Presentation("presentation.otp");

// Create a reference to IDocumentProperties object associated with Presentation
IDocumentProperties documentProperties = presentation.DocumentProperties;

// Set the builtin properties
documentProperties.Author = "Aspose.Slides for .NET";
documentProperties.Title = "Modifying Presentation Properties";
documentProperties.Subject = "Aspose Subject";
documentProperties.Comments = "Aspose Description";
documentProperties.Manager = "Aspose Manager";

// Save your presentation to a file
presentation.Save("DocumentProperties_out.otp", SaveFormat.Otp);

Aangepaste eigenschappen toevoegen aan OTP - C#


// Instantiate the Presentation class
Presentation presentation = new Presentation();

// Getting Document Properties
IDocumentProperties documentProperties = presentation.DocumentProperties;

// Adding Custom properties
documentProperties["New Custom"] = 12;
documentProperties["My Name"] = "Aspose Metadata Editor";
documentProperties["Custom"] = 124;

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

// Removing selected property
documentProperties.RemoveCustomProperty(getPropertyName);

// Save your presentation to a file
presentation.Save("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.