Skip to content

Instantly share code, notes, and snippets.

@njofce
Created February 16, 2020 09:34
Show Gist options
  • Select an option

  • Save njofce/dc4bcd7a688cb905f704e8f3654c8cc5 to your computer and use it in GitHub Desktop.

Select an option

Save njofce/dc4bcd7a688cb905f704e8f3654c8cc5 to your computer and use it in GitHub Desktop.
//create a new empty slide show
XMLSlideShow ppt = new XMLSlideShow();
//add first slide
XSLFSlide slide1 = ppt.createSlide();
byte[] decodedSvg = Base64.getDecoder().decode(svgString);
XSLFPictureData pictureData = ppt.addPicture(new ByteArrayInputStream(decodedSvg), org.apache.poi.sl.usermodel.PictureData.PictureType.SVG);
XSLFPictureShape shape = XSLFPictureShape.addSvgImage(slide1, pictureData, null, null);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment