Language:English(中文)
Language:中文文档 English Documents
You can also go to the official website to view the Chinese documentation, the content is consistent and more comfortable to read
Java to generate PPT documents toolkit, support the new features of the 2010 version of PPTX
For example, the following PPT is made entirely with this Jar package
Including this video is also generated automatically through the Jar package
example.mp4
- PPT multiple pages
- PPT background music
- PPT switching animation, automatic timing switching
- PPT text, picture, shape and other elements insertion support
- entrance animation of PPT elements
- PPT to generate pictures (fonts will not be messed up, only available in Windows environment)
- PPT generate MP4 video (fonts will not be messed up, only available in Windows environment)
- Read information according to the specified PPT page file
You can use maven to add jar package references, or directly download jar packages and manually import
<dependency>
<groupId>cc.pptshow</groupId>
<artifactId>pptshow</artifactId>
<version>1.3</version>
</dependency>
Download address:https://s01.oss.sonatype.org/service/local/repositories/releases/content/cc/pptshow/pptshow/1.3/pptshow-1.3.jar
After successful import, create a new Main class, copy the following code and paste it in:
import cc.pptshow.ppt.domain.*;
import cc.pptshow.ppt.element.impl.*;
import cc.pptshow.ppt.show.PPTShow;
import cc.pptshow.ppt.show.PPTShowSide;
public class Main {
public static void main(String[] args) {
//Create a new PPT object
PPTShow pptShow = PPTShow.build();
//Create a new PPT page
PPTShowSide side = PPTShowSide.build();
//Create an in-line text object with the text set to Hello World
PPTInnerText pptInnerText = PPTInnerText.build("Hello World");
//Create an in-line text style object so that the text color is red
PPTInnerTextCss pptInnerTextCss = PPTInnerTextCss.build().setColor("FF00000");
//Binding in-line text and style objects
pptInnerText.setCss(pptInnerTextCss);
//Create a line text object from in-line text and create a text object from a line text object
PPTText pptText = PPTText.build(PPTInnerLine.build(pptInnerText));
//Adding text objects to a PPT page
side.add(pptText);
//Add PPT page inside PPT
pptShow.add(side);
//Output to file
pptShow.toFile("C:/Users/xxx/Desktop/test.pptx");
}
}
The common PPT generation process does not rely on system or third-party components for any function
Linux or Windows systems can be used normally
Video and image generation for Windows is achieved by calling Windows Office through vbs, only these two functions depend on Windows system
Apache-2.0 License Agreement
i.e. for commercial use, modification, distribution, proprietary use, private use
However, registration as a trademark is not permitted, and no responsibility or guarantee of availability is given for the program.