Access or Modify Properties of PowerPoint Files using Java

Document Properties in PowerPoint Java

PowerPoint files contain some additional information known as document properties. These properties are used for the identification of the presentations, which include author, title, keywords, subject, etc. In this article, you will learn how to add, access or modify the document properties in PowerPoint files using Java.

Java API for Document Properties in PowerPoint Files

To access or modify the document properties in PowerPoint presentations, we will use Aspose.Slides for Java. The API allows you to create and manipulate PowerPoint and OpenOffice documents. It is available as a downloadable JAR as well as on Maven. You can install it using the following Maven configurations.

<repository>
    <id>AsposeJavaAPI</id>
    <name>Aspose Java API</name>
    <url>http://repository.aspose.com/repo/</url>
</repository>
<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-slides</artifactId>
    <version>21.8</version>
    <classifier>jdk16</classifier>
</dependency>

Types of Document Properties in PowerPoint Presentations

There are two types of document properties in PowerPoint files: built-in and custom. The former provides general information about the presentations such as title, author, subject, etc. Whereas, the latter is used to add user-defined properties. In the below sections, you will see how to add, access, and modify built-in and custom document properties in PowerPoint presentations.

Access Built-in Properties in PowerPoint Presentations using Java

The following are the steps to access the built-in properties in PowerPoint presentations using Java.

The following code sample shows how to access built-in properties in PowerPoint presentations.

Modify Built-in Properties in PowerPoint Presentations using Java

The following are the steps to modify the values of the built-in properties in PowerPoint presentations using Java.

The following code sample shows how to modify the built-in properties in PowerPoint Presentations.

Add Custom Properties in PowerPoint Presentations using Java

The following are the steps to add custom properties in a PowerPoint presentation using Java.

The following code sample shows how to add custom properties in a PowerPoint presentation.

Access Custom Properties in PowerPoint Presentations using Java

The following steps demonstrate how to access the custom properties in a PowerPoint Presentation using Java.

The following code sample shows how to access custom properties in a PowerPoint Presentation.

Modify Custom Properties in PowerPoint Presentations using Java

The following are the steps to modify the custom properties in a PowerPoint presentation.

The following code sample shows how to modify a custom property in a PowerPoint presentation.

Get a Free API License

You can use Aspose.Slides for Java without evaluation limitations by requesting a temporary license.

Online Demo

Try Aspose.Slides based online tool to view and edit document properties in the presentations.

Conclusion

In this article, you have learned how to access and modify document properties in PowerPoint presentations using Java. We have explicitly covered the manipulation of built-in as well as custom document properties in the presentations. In addition, you can visit the documentation to explore other features of Aspose.Slides for Java. Also, you can post your queries to our forum.

See Also