Add Transitions to Powerpoint Slides in Java

Import Dependency (2 Methods)

● Download the free library and unzip it, and then add the Spire.Presentation.jar file to your project as dependency.
● Directly add the jar dependency to your maven project by adding the following configurations to the pom.xml.


Sample Code

The Islide.getSlideShowTransition().setType() method, Islide.getSlideShowTransition().setSoundMode() method and Islide.getSlideShowTransition().setSpeed() method offered by Free Spire.Presentation for Java allow you to set transition type, sound mode and speed for the specified slides. The complete sample code are as follows:

import com.spire.presentation.*;
import com.spire.presentation.drawing.transition.*;

public class setTransitions {
public static void main(String[] args) throws Exception{

//Load a PowertPoint document
Presentation presentation = new Presentation();

//Set the first slide transition as push and sound mode

//Set the second slide transition as split and set the speed

//Save the file
presentation.saveToFile("setTransitions.pptx", FileFormat.PPTX_2010);



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store