PPT PPTX ODP POT ppsx
Aspose.Slides  for Java
PPS

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

Xây dựng các ứng dụng Java 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 Java

Khi sử dụng Aspose.Slides for Java, 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 - Java


Presentation pres = new Presentation("Presentation.pps");
try {
    // Create a reference to IDocumentProperties object associated with Presentation
    IDocumentProperties dp = pres.getDocumentProperties();
    
    // Set the built-in properties
    dp.setAuthor("Aspose.Slides for Java");
    dp.setTitle("Modifying Presentation Properties");
    dp.setSubject("Aspose Subject");
    dp.setComments("Aspose Description");
    dp.setManager("Aspose Manager");
    
    // Save your presentation to a file
    pres.save("DocProps.pps", SaveFormat.Pps);
} finally {
    if (pres != null) pres.dispose();
}

Thêm thuộc tính tùy chỉnh vào PPS - Java


Presentation pres = new Presentation();
try {
    // Getting Document Properties
    IDocumentProperties dProps = pres.getDocumentProperties();
    
    // Adding Custom properties
    dProps.set_Item("New Custom", 12);
    dProps.set_Item("My Name", "Aspose Metadata Editor");
    dProps.set_Item("Custom", 124);
    
    // Getting property name at particular index
    String getPropertyName = dProps.getCustomPropertyName(2);
    
    // Removing selected property
    dProps.removeCustomProperty(getPropertyName);
    
    // Saving presentation
    pres.save("CustomDemo.pps", SaveFormat.Pps);
} finally {
    if (pres != null) pres.dispose();
}

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

Đâ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 Java, 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.