-
Notifications
You must be signed in to change notification settings - Fork 13
/
algorithm.txt
24 lines (20 loc) · 1.1 KB
/
algorithm.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
My awesome slide extractor algorithm
1. Look at the number of arguments
1.1 If there are no arguments, print the usage statement
1.2 If there is at least one argument, try to read in PowerPoint filename
2. Open the PowerPoint file
2.1 If opening the file fails. print the error and usage statement
3. Extract each slide and report content
4. Render each slide into a graphics buffer
5. Save the graphics buffer to a file
6. Close the PowerPoint file
7. Exit program
Use Apache POI to work with the PowerPoint files. In particular, we’ll need to use:
org.apache.poi.openxml4j.opc.OPCPackage;
org.apache.poi.xslf.usermodel.XSLFSlide
References:
1. https://poi.apache.org/apidocs/4.1/
2. http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/xslf/usermodel/PPTX2SVG.txt
3. https://poi.apache.org/apidocs/dev/org/apache/poi/xslf/usermodel/XSLFSlide.html
4. https://stackoverflow.com/questions/8202253/saving-a-java-2d-graphics-image-as-png-file
5. https://docs.oracle.com/javase/8/docs/api/javax/imageio/ImageIO.html#write-java.awt.image.RenderedImage-java.lang.String-java.io.File-