PPTShow: Cross-platform open source Java toolkit for generating PPT files

 Project official website: https://pptshow.cc/

Reference document: https://pptshow.cc/book/ (produced by GitPage, if it cannot be opened, please surf scientifically)

Open source address: https://github.com/qrpcode/pptshow (remember to star if it helps~)

Domestic mirror: Chinese version (Gitee)      Github mirror (Gitcode)

introduce

PPTShow is an open source Java toolkit for generating PPT documents, supporting the new features of the 2010 version of PPTX.

Such as shadows, gradient backgrounds, gradient fills, etc...

It almost blocks the underlying XML operations, and users only need to create element objects extremely simply to generate PPT;

Perfectly supports operations such as fonts in the Chinese environment, and has made special adaptations for Chinese.

It also supports PPT to generate pictures, PPT to generate videos, etc.

Feel it first

For example, the following PPT was completely produced using this Jar package,
including this video, which was also automatically generated through the Jar package.

PPTShow demonstration video (Java generation PPT toolkit)

Function support

PPT basic editing functions

  1. PPT multiple pages
  2. PPT background music
  3. PPT switching animation, automatic timing switching
  4. Insertion support for PPT text, pictures, shapes and other elements
  5. Entrance animation of PPT elements
  6. ...

PPT expansion function

  1. PPT generates pictures (fonts will not be messy, only available in Windows environment)
  2. PPT generates MP4 video (fonts will not be messy, only available in Windows environment)

PPT reading

  1. Read information based on the specified PPT page file

10 seconds good

You can use maven to add a jar package reference, or directly download the jar package and import it manually

Maven coordinates [recommended]

<dependency>
  <groupId>cc.pptshow</groupId>
  <artifactId>pptshow</artifactId>
  <version>1.3</version>
</dependency>

Download and import manually [not recommended]

download link:

https://s01.oss.sonatype.org/service/local/repositories/releases/content/cc/pptshow/pptshow/1.3/pptshow-1.3.jar

After the import is successful, 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) {
       //新建一个PPT对象
       PPTShow pptShow = PPTShow.build();
       //新建一页PPT
       PPTShowSide side = PPTShowSide.build();
       
       //创建一个行内文本对象,文字设定为Hello World
       PPTInnerText pptInnerText = PPTInnerText.build("Hello World");
       //创建一个行内文本样式对象,让文本颜色为红色
       PPTInnerTextCss pptInnerTextCss = PPTInnerTextCss.build().setColor("FF00000");
       //绑定行内文本和样式对象
       pptInnerText.setCss(pptInnerTextCss);
       
       //通过行内文本创建一个行文本对象,并通过行文本对象创建文本对象
       PPTText pptText = PPTText.build(PPTInnerLine.build(pptInnerText));
       //在PPT页面中添加文本对象
       side.add(pptText);
       //在PPT里面添加PPT页面
       pptShow.add(side);
       
       //输出到文件
       pptShow.toFile("C:/Users/qrp19/Desktop/test4.pptx");
   }

}

Jar package description

Any function of the common PPT generation process does not rely on the system or third-party components. It
can be used normally under Linux or Windows systems.
The function of generating videos and pictures for Windows is achieved by calling the Windows system Office through vbs. Only these two functions depend on the Windows system.

License agreement

The Apache-2.0 protocol license
allows for: commercial use, modification, distribution, patent use, private use,
but registration as a trademark is not allowed, and we are not responsible for the program and do not guarantee its availability.

BUG feedback: Chinese issues    English issues

Guess you like

Origin blog.csdn.net/qq_20051535/article/details/121190250