Created attachment 36002 [details] Template PPT for Generation I want to generate PPT based on my own template PPT refer to the attachment. I debugged from my side, found there is an error when executed syntax _drawing = new XSLFDrawing(this, cgs) in XSLFSheet>initDrawingAndShapes. But when I remove the Object Type from Selection Panel in the template PPT, it works well. Please help solve the problem. Many thanks in advance
Apart of the image1.wmf and oleObject1.bin containing a lot of empty space, I had no problems with your template with the current 4.0.0-SNAPSHOT. @Test public void bug62517() throws IOException { ZipSecureFile.setMinInflateRatio(0.001); try (InputStream fis = new FileInputStream("Template.pptx"); XMLSlideShow ppt = new XMLSlideShow(fis)) { XSLFSlide sld = ppt.getSlides().get(0); XSLFTextShape ts = (XSLFTextShape)sld.getShapes().get(0); ts.setText("not-a-template text"); XSLFAutoShape as = sld.createAutoShape(); as.setAnchor(new Rectangle2D.Double(100,100,100,100)); as.setShapeType(ShapeType.GEAR_9); as.setFillColor(Color.RED); try (FileOutputStream fos = new FileOutputStream("bla.pptx")) { ppt.write(fos); } } } I don't understand what you mean by "remove the Object Type from Selection Panel".