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

Xây dựng ứng dụng .NET đọc và sửa đổi thuộc tính tích hợp và tùy chỉnh của bản trình bày bằng API phía máy chủ.

Sửa đổi thuộc tính OTP bằng C#

Với Aspose.Slides for .NET , nhà phát triển có thể truy cập và sửa đổi thuộc tính tích hợp và tùy chỉnh của bản trình bày. Dùng thuộc tính DocumentProperties của đối tượng Presentation để đọc và cập nhật siêu dữ liệu OTP.

Sửa đổi thuộc tính tích hợp của OTP – C#

using var presentation = new Presentation("presentation.otp");
var documentProperties = presentation.DocumentProperties;

documentProperties.Author = "Aspose.Slides for .NET";
documentProperties.Title = "Modifying Presentation Properties";
documentProperties.Subject = "Aspose Subject";
documentProperties.Comments = "Aspose Description";
documentProperties.Manager = "Aspose Manager";

presentation.Save("DocumentProperties_out.otp", SaveFormat.Otp);

Thêm thuộc tính tùy chỉnh vào OTP – C#

using var presentation = new Presentation();
var documentProperties = presentation.DocumentProperties;

documentProperties["New Custom"] = 12;
documentProperties["My Name"] = "Aspose Metadata Editor";
documentProperties["Custom"] = 124;

var propertyName = documentProperties.GetCustomPropertyName(2);
documentProperties.RemoveCustomProperty(propertyName);

presentation.Save("CustomDocumentProperties_out.otp", SaveFormat.Otp);

Cách xem hoặc chỉnh sửa siêu dữ liệu OTP trong C#

Làm theo các bước sau để xem hoặc chỉnh sửa siêu dữ liệu OTP.

  1. Tải tệp OTP bằng Presentation.
  2. Lấy đối tượng DocumentProperties của bản trình bày.
  3. Đọc hoặc cập nhật các thuộc tính tích hợp như Author, Title và Subject.
  4. Truy cập và sửa đổi thuộc tính tùy chỉnh bằng DocumentProperties.

Được xây dựng bằng Aspose.Slides

Xem và chỉnh sửa siêu dữ liệu OTP trực tuyến

Ứng dụng Aspose.Slides Metadata miễn phí được xây dựng bằng Aspose.Slides for .NET, cùng API với đoạn mã ở trên. Hãy mở ứng dụng và xem API có thể làm gì với các tệp OTP của riêng bạn.

  • Chạy trong trình duyệt, không cần cài đặt gì.
  • Xem Aspose.Slides đọc và ghi thuộc tính như thế nào trước khi viết mã.
  • Xem và chỉnh sửa thuộc tính tích hợp và tùy chỉnh của tệp OTP.
  • Lưu và tải xuống tệp đã cập nhật.

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

Với C#, bạn cũng có thể quản lý siêu dữ liệu của các định dạng sau.