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

แก้ไขคุณสมบัติ PPS โดยใช้ C++

สร้างแอป C++ ของคุณเองเพื่อแก้ไขคุณสมบัติในตัวและคุณสมบัติกำหนดเองในไฟล์งานนำเสนอโดยใช้ API ฝั่งเซิร์ฟเวอร์

แก้ไขคุณสมบัติ PPS ผ่าน C++

เมื่อใช้ Aspose.Slides for C++ นักพัฒนาสามารถเข้าถึงและแก้ไขค่าของคุณสมบัติในตัวรวมถึงคุณสมบัติที่กำหนดเอง นักพัฒนาสามารถใช้คุณสมบัติ DocumentProperties ที่เปิดเผยโดยออบเจกต์การนำเสนอเพื่อเข้าถึงคุณสมบัติเอกสารของไฟล์การนำเสนอ

แก้ไข PPS คุณสมบัติในตัว - C++


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

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

เพิ่มคุณสมบัติที่กำหนดเองใน PPS - 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.pps", SaveFormat::Pps);

วิธีดึงข้อมูลเมตาของ PPS ผ่าน C++

นี่คือขั้นตอนในการดึงข้อมูลเมตาจากไฟล์ PPS

  1. สร้างอินสแตนซ์ของคลาสงานนำเสนอด้วยพาธไปยังไฟล์ PPS

  2. รับวัตถุ DocumentProperties ที่เกี่ยวข้องกับการนำเสนอ

  3. วนซ้ำรายการในวัตถุ DocumentProperties

  4. เข้าถึงและแก้ไขคุณสมบัติแบบกำหนดเอง

รูปแบบ Metadata อื่นๆ ที่รองรับ

เมื่อใช้ C++ คุณยังสามารถจัดการข้อมูลเมตาของรูปแบบอื่นๆ ได้อีกมากมาย เช่น