Package slides.workingwithpresentation

Source Code of slides.workingwithpresentation.ApacheOpenandSave

package slides.workingwithpresentation;

import java.io.FileInputStream;
import java.io.FileOutputStream;

import org.apache.poi.xslf.usermodel.XMLSlideShow;
import org.apache.poi.xslf.usermodel.XSLFSlide;

public class ApacheOpenandSave
{
  public static void main(String[] args) throws Exception
  {
    XMLSlideShow ppt = new XMLSlideShow(new FileInputStream("data/presentation.pptx"));

      //append a new slide to the end
      XSLFSlide blankSlide = ppt.createSlide();
     
    //save changes in a file
    FileOutputStream out = new FileOutputStream("data/EditedPPT_Apache.pptx");
    ppt.write(out);
    out.close();

    System.out.println("Presentation Edited and Saved.");
  }
}
TOP

Related Classes of slides.workingwithpresentation.ApacheOpenandSave

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.