Add Transitions to Powerpoint Slides in Java

Import Dependency (2 Methods)

<repositories>
<repository>
<id>com.e-iceblue</id>
<name>e-iceblue</name>
<url>http://repo.e-iceblue.com/nexus/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>e-iceblue</groupId>
<artifactId>spire.presentation.free</artifactId>
<version>5.1.0</version>
</dependency>
</dependencies>

Sample Code

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();
presentation.loadFromFile("Symbolism.pptx");

//Set the first slide transition as push and sound mode
presentation.getSlides().get(0).getSlideShowTransition().setType(TransitionType.PUSH);
presentation.getSlides().get(0).getSlideShowTransition().setSoundMode(TransitionSoundMode.START_SOUND);

//Set the second slide transition as split and set the speed
presentation.getSlides().get(1).getSlideShowTransition().setType(TransitionType.SPLIT);
presentation.getSlides().get(1).getSlideShowTransition().setSpeed(TransitionSpeed.SLOW);

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

--

--

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