Package org.apache.poi.xslf.usermodel

Examples of org.apache.poi.xslf.usermodel.XMLSlideShow.createSlide()


                System.out.println(layout.getType());
            }
        }

        // blank slide
        XSLFSlide blankSlide = ppt.createSlide();

        XSLFSlideMaster defaultMaster = ppt.getSlideMasters()[0];

        // title slide
        XSLFSlideLayout titleLayout = defaultMaster.getLayout(SlideLayout.TITLE);
View Full Code Here


        XSLFSlideMaster defaultMaster = ppt.getSlideMasters()[0];

        // title slide
        XSLFSlideLayout titleLayout = defaultMaster.getLayout(SlideLayout.TITLE);
        XSLFSlide slide1 = ppt.createSlide(titleLayout);
        XSLFTextShape title1 = slide1.getPlaceholder(0);
        title1.setText("First Title");

        // title and content
        XSLFSlideLayout titleBodyLayout = defaultMaster.getLayout(SlideLayout.TITLE_AND_CONTENT);
View Full Code Here

        XSLFTextShape title1 = slide1.getPlaceholder(0);
        title1.setText("First Title");

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

        XSLFTextShape title2 = slide2.getPlaceholder(0);
        title2.setText("Second Title");

        XSLFTextShape body2 = slide2.getPlaceholder(1);
View Full Code Here

  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();
View Full Code Here

public class ApacheFormatting
{
  public static void main(String[] args) throws Exception
  {
    XMLSlideShow ppt = new XMLSlideShow();
      XSLFSlide slide = ppt.createSlide();

      XSLFTextBox shape = slide.createTextBox();
      XSLFTextParagraph p = shape.addNewTextParagraph();

      XSLFTextRun r1 = p.addNewTextRun();
View Full Code Here

  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];
View Full Code Here

      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);
View Full Code Here

      // 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();
   
View Full Code Here

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

    //add slides
      ppt.createSlide();
      ppt.createSlide();
      ppt.createSlide();

      XSLFSlide[] slides = ppt.getSlides();
      ppt.setSlideOrder(slides[0], 4);
View Full Code Here

  {
    XMLSlideShow ppt = new XMLSlideShow(new FileInputStream("data/presentation.pptx"));

    //add slides
      ppt.createSlide();
      ppt.createSlide();
      ppt.createSlide();

      XSLFSlide[] slides = ppt.getSlides();
      ppt.setSlideOrder(slides[0], 4);
     
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.