Examples of XMLSlideShow


Examples of org.apache.poi.xslf.usermodel.XMLSlideShow

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

      // blank slide
      ppt.createSlide();

      // there can be multiple masters each referencing a number of layouts
      // for demonstration purposes we use the first (default) slide master
      XSLFSlideMaster defaultMaster = ppt.getSlideMasters()[0];

      // title slide
      XSLFSlideLayout titleLayout = defaultMaster.getLayout(SlideLayout.TITLE);
      // fill the placeholders
      XSLFSlide slide1 = ppt.createSlide(titleLayout);

      // title and content
      XSLFSlideLayout titleBodyLayout = defaultMaster.getLayout(SlideLayout.TITLE_AND_CONTENT);
      XSLFSlide slide2 = ppt.createSlide(titleBodyLayout);

      FileOutputStream out = new FileOutputStream("data/Apache_Layouts.pptx");
    ppt.write(out);
    out.close();
   
    System.out.println("Layout slides created Successfuly.");
  }
View Full Code Here
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.