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

Chỉnh sửa thuộc tính PPS bằng C++

Xây dựng các ứng dụng C++ của riêng bạn để sửa đổi các thuộc tính Tích hợp và Tùy chỉnh trong tệp bản trình bày bằng cách sử dụng API phía máy chủ.

Sửa đổi Thuộc tính PPS qua C++

Khi sử dụng Aspose.Slides for C++, nhà phát triển có thể truy cập và sửa đổi giá trị của thuộc tính tích hợp cũng như thuộc tính tùy chỉnh. Nhà phát triển có thể sử dụng thuộc tính DocumentProperties do đối tượng Bản trình bày hiển thị để truy cập các thuộc tính tài liệu của tệp bản trình bày.

Sửa đổi Thuộc tính tích hợp 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);

Thêm thuộc tính tùy chỉnh vào 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);

Cách trích xuất siêu dữ liệu của PPS qua C++

Đây là các bước để Trích xuất siêu dữ liệu từ tệp PPS.

  1. Khởi tạo lớp Trình bày với đường dẫn đến tệp PPS

  2. Nhận đối tượng DocumentProperties được liên kết với Bản trình bày

  3. Lặp lại các mục trong đối tượng DocumentProperties

  4. Truy cập và sửa đổi thuộc tính tùy chỉnh

Các định dạng siêu dữ liệu được hỗ trợ khác

Sử dụng C++, Bạn cũng có thể thao tác với siêu dữ liệu của nhiều định dạng khác bao gồm.