Product Page | Tutorials | Examples | Forum | Customized Demo | Temporary License
Spire.Presentation for Java is a professional PowerPoint API that enables developers to create, read, write, convert and save PowerPoint documents in Java Applications. As an independent Java library, Spire.Presentation doesn't need Microsoft PowerPoint to be installed on system.
A rich set of features can be supported by Spire.Presentation for Java, such as add/edit/remove slide, create chart, create table, add bullets, encrypt and decrypt PPT, add watermark, add hyperlink, insert audio and video, paragraph settings, document properties settings, insert/extract image, extract text, set animation, add header and footer, add/delete comment, add note, create SmartArt.
Spire.Presentation for Java is a 100% independent Java PowerPoint API which doesn't require Microsoft PowerPoint to be installed on system.
- PPT - PowerPoint Presentation 97-2003
- PPS - PowerPoint SlideShow 97-2003
- PPTX - PowerPoint Presentation 2007/2010/2013/2016/2019
- PPSX - PowerPoint SlideShow 2007, 2010
Spire.Presentation for Java supports to process a variety of PowerPoint elements, such as slide, text, image, shape, table, chart, watermark, animation, header and footer, comment, note, SmartArt, hyperlink, OLE object, audio and video.
Spire.Presentation for Java allow developers to convert PowerPoint documents to other file formats such as:
//create a Presentataion instance
Presentation presentation = new Presentation();
//load the sample PowerPoint file
presentation.loadFromFile("C:/Users/Administrator/Desktop/example.pptx");
//save to PDF file
presentation.saveToFile("toPDF.pdf", FileFormat.PDF);
presentation.dispose();
Presentation ppt = new Presentation();
ppt.loadFromFile("C:\\Users\\Administrator\\Desktop\\Sample.pptx");
//Save PPT document to images
for (int i = 0; i < ppt.getSlides().getCount(); i++) {
BufferedImage image = ppt.getSlides().get(i).saveAsImage();
String fileName = String.format("output/ToImage-%d.png", i);
ImageIO.write(image, "PNG",new File(fileName));
}
ppt.dispose();
Presentation ppt = new Presentation();
ppt.loadFromFile("C:\\Users\\Administrator\\Desktop\\Sample.pptx");
//Save PPT document to images
ArrayList svgBytes =(ArrayList) ppt.saveToSVG();
int count = svgBytes.size();
int len = svgBytes.size();
for (int i = 0; i < len; i++)
{
byte[] bytes = svgBytes.get(i);
FileOutputStream stream = new FileOutputStream(String.format("output/ToSVG-%d.svg", i));
stream.write(bytes);
}
ppt.dispose();