Package org.apache.poi.xslf.usermodel

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


  {
    XMLSlideShow ppt = new XMLSlideShow();
      XSLFSlide slide = ppt.createSlide();

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

      XSLFTextRun r1 = p.addNewTextRun();
      r1.setText("The");
      r1.setFontColor(Color.blue);
      r1.setFontSize(24);

      XSLFTextRun r2 = p.addNewTextRun();
      r2.setText(" quick");
      r2.setFontColor(Color.red);
      r2.setBold(true);

      XSLFTextRun r3 = p.addNewTextRun();
      r3.setText(" brown");
      r3.setFontSize(12);
      r3.setItalic(true);
      r3.setStrikethrough(true);
     
      XSLFTextRun r4 = p.addNewTextRun();
      r4.setText(" fox");
      r4.setUnderline(true);

      //save changes in a file
    FileOutputStream out = new FileOutputStream("data/Formatted Text_Apache.pptx");
View Full Code Here

TOP

Related Classes of org.apache.poi.xslf.usermodel.XSLFTextParagraph

Copyright © 2018 www.massapicom. 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.