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

Chỉnh sửa thuộc tính PPSM bằng C#

Xây dựng các ứng dụng .NET 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 PPSM qua C#

Khi sử dụng Aspose.Slides for .NET, 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 PPSM - C#


// Instantiate the Presentation class that represents the Presentation
Presentation presentation = new Presentation("presentation.ppsm");

// 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.ppsm", SaveFormat.Ppsm);

Thêm thuộc tính tùy chỉnh vào PPSM - 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.ppsm", SaveFormat.Ppsm);

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

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

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

  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.