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

Redigera egenskaper för OTP med C#

Bygg dina egna .NET-appar för att ändra inbyggda och anpassade egenskaper i presentationsfiler med hjälp av API:er på serversidan.

Ändra OTP-egenskaper via C#

Med hjälp av Aspose.Slides for .NET kan utvecklare komma åt och ändra värdena för inbyggda egenskaper såväl som anpassade egenskaper. Utvecklare kan använda egenskapen DocumentProperties som exponeras av Presentation-objektet för att komma åt presentationsfilens dokumentegenskaper.

Ändra OTP inbyggda egenskaper - 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);

Lägg till anpassade egenskaper i 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);

Hur man extraherar metadata för OTP via C#

Det här är stegen för att extrahera metadata från OTP-filer.

  1. Instantiera presentationsklassen med sökvägen till filen OTP

  2. Hämta DocumentProperties-objekt kopplat till Presentation

  3. Slinga över objekten i DocumentProperties-objektet

  4. Få tillgång till och ändra anpassade egenskaper

Andra metadataformat som stöds

Med hjälp av C# kan du också manipulera metadata i många andra format, inklusive.