Edit POT Properties using Java

Build Java applications that modify built-in and custom properties in presentation files using server-side APIs.

Modify POT 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 POT Built-in Properties - Java

Presentation presentation = new Presentation("Presentation.pot");
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.pot", SaveFormat.Pot);
} finally {
    presentation.dispose();
}

Add Custom Properties to POT - 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.pot", SaveFormat.Pot);
} finally {
    presentation.dispose();
}

How to View or Edit POT Metadata using Java

Follow these steps to view or edit POT metadata.

  1. Load the POT file with the Presentation class.
  2. Call the getDocumentProperties method to get the IDocumentProperties object.
  3. Read or update built-in properties such as Author, Title, Subject, and Comments.
  4. Access and modify custom properties with set_Item, getCustomPropertyName, and removeCustomProperty.

Built with Aspose.Slides

View and Edit POT Metadata Online

The free Aspose.Slides Metadata app is built with Aspose.Slides for Java, the same API as the code above. Open it and see what the API can do with your own POT files.

  • Runs in your browser, nothing to install.
  • See how Aspose.Slides reads and writes properties before you write code.
  • View and edit built-in and custom properties of your POT file.
  • Save and download the updated file.

Other Supported Metadata Formats

Using Java, you can also manage metadata in the following formats.