PPT
PPTX
ODP
POT
PPSX
POTX
Edit POTX properties using Java
Build Java applications that modify built-in and custom properties in presentation files using server-side APIs.
Modify POTX Properties via Java
Using
Aspose.Slides for Java
, developers can access and modify built-in and custom presentation properties. Use the getDocumentProperties method on a Presentation object to access the IDocumentProperties object for the presentation file.
Modify POTX Built-in Properties - Java
Presentation presentation = new Presentation("Presentation.potx");
try {
IDocumentProperties documentProperties = presentation.getDocumentProperties();
documentProperties.setAuthor("Aspose.Slides for Java");
documentProperties.setTitle("Modifying Presentation Properties");
documentProperties.setSubject("Aspose Subject");
documentProperties.setComments("Aspose Description");
documentProperties.setManager("Aspose Manager");
presentation.save("DocProps.potx", SaveFormat.Potx);
} finally {
presentation.dispose();
}
Add Custom Properties to POTX - Java
Presentation presentation = new Presentation();
try {
IDocumentProperties documentProperties = presentation.getDocumentProperties();
documentProperties.set_Item("New Custom", 12);
documentProperties.set_Item("My Name", "Aspose Metadata Editor");
documentProperties.set_Item("Custom", 124);
String customPropertyName = documentProperties.getCustomPropertyName(2);
documentProperties.removeCustomProperty(customPropertyName);
presentation.save("CustomDemo.potx", SaveFormat.Potx);
} finally {
presentation.dispose();
}
How to Extract Metadata of POTX via Java
These are the steps to extract metadata from POTX files.
Load the
POTXfile with thePresentationclass.Call the
getDocumentPropertiesmethod to get theIDocumentPropertiesobject.Read or update built-in properties such as
Author,Title,Subject, andComments.Access and modify custom properties with
set_Item,getCustomPropertyName, andremoveCustomProperty.