Apply 3D Effects in PowerPoint using Java

3D effects in PowerPoint are used to make the presentations more attractive and catch users’ attention Therefore, you may come across the requirement of adding 3D objects to presentations programmatically. In this article, you will learn how to create 3D effects in PowerPoint PPT or PPTX in Java. We will show you how to create 3D text and shapes and apply 3D effects to images.

Java API to Apply 3D Effects in PowerPoint PPT

Aspose.Slides for Java is a powerful API encapsulating a wide range of presentation manipulation features. Using the API, you can create interactive presentations and manipulate existing PPT/PPTX files seamlessly. To create 3D effects in the PowerPoint presentations, we will utilize this API.

You can either download API’s JAR or install it using the following Maven configurations.

Repository:

<repository>
    <id>AsposeJavaAPI</id>
    <name>Aspose Java API</name>
    <url>https://repository.aspose.com/repo/</url>
</repository>

Dependency:

<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-slides</artifactId>
    <version>22.1</version>
    <classifier>jdk16</classifier>
</dependency>

Create a 3D Text in PowerPoint in Java

The following are the steps to create a 3D text fragment in PowerPoint PPT using Java.

The following code sample shows how to create 3D text in PowerPoint PPT in Java.

The following screenshot shows the output of the code sample above.

Create a 3D Text in PowerPoint in Java

Create a 3D Shape in PowerPoint PPT in Java

Similar to text, you can apply 3D effects to the shapes in PowerPoint presentations. The following are the steps to create a 3D shape in PowerPoint PPT using Java.

The following code sample shows how to apply 3D effects to shapes in PowerPoint using Java.

The following is the 3D shape that we get after executing this code.

Create a 3D Shape in PowerPoint in Java

Create Gradient for 3D Shapes in PPT

You can also apply gradient effects to the shapes by following the steps below.

The following code sample shows how to apply gradient effects to shapes in a PowerPoint PPT.

The following is the 3D shape after applying the gradient effect.

Create Gradient for 3D Shapes in PPT in Java

Apply 3D Effects to an Image in PowerPoint in Java

Aspose.Slides for Java also allows you to apply 3D effects to an image. The following are the steps to perform this operation in Java.

The following are the steps to apply 3D effects to an image in PPT using Java.

The following is the resultant image that we get after applying 3D effects.

Apply 3D Effects to an Image in PowerPoint in Java

Apply 3D Effects in PowerPoint PPT - Get a Free License

You can get a free temporary license and apply 3D effects in PowerPoint PPT without evaluation limitations.

Conclusion

In this article, you have learned how to apply 3D effects in PowerPoint PPT/PPTX using Java. With the help of code samples, we have demonstrated how to create 3D text or shapes and apply 3D effects to images in PPT or PPTX presentations. You can visit the documentation to explore more about Aspose.Slides for Java. Also, you can post your questions or queries to our forum.

See Also