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

Edit properti OTP menggunakan C#

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

Ubah Properti OTP melalui C#

Dengan menggunakan Aspose.Slides for .NET, 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 OTP Properti Bawaan - 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);

Tambahkan Properti Kustom ke 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);

Cara Mengekstrak Metadata OTP melalui C#

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

  1. Buat instance kelas Presentasi dengan jalur ke file OTP

  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.