daily pastebin goal
58%
SHARE
TWEET

Untitled

a guest Mar 19th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // we create the first slide
  2. XSLFSlide slide = ppt.createSlide(layout);
  3. XSLFTextShape title = slide.getPlaceholder(0);
  4. // we remove the predefined text
  5. title.clearText();
  6.  
  7. // we create a new paragraph
  8. XSLFTextParagraph p = title.addNewTextParagraph();
  9. XSLFTextRun r = p.addNewTextRun();
  10. r.setText("Making Money Online Digest");
  11. r.setFontColor(Color.decode("#c62828"));
  12. r.setFontSize(50.);
  13.  
  14. // We add an image from resources in the PPTX
  15. InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("makingmoneyonline_banner_750.png");
  16. byte[] pd = IOUtils.toByteArray(is);
  17.  
  18. XSLFPictureData pictureData = ppt.addPicture(pd, PictureData.PictureType.PNG);
  19. // we define the position for the data
  20. XSLFPictureShape pictureShape = slide.createPicture(pictureData);
  21. pictureShape.setAnchor(new Rectangle(20,180,680,188));
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top