List of usage examples for org.apache.poi.xslf.usermodel XSLFTextShape setAnchor
@Override
public void setAnchor(Rectangle2D anchor)
From source file:poi.xslf.usermodel.Tutorial3.java
License:Apache License
public static void main(String[] args) throws IOException { XMLSlideShow ppt = new XMLSlideShow(); XSLFSlide slide = ppt.createSlide(); XSLFTextShape titleShape = slide.createTextBox(); titleShape.setPlaceholder(Placeholder.TITLE); titleShape.setText("This is a slide title"); titleShape.setAnchor(new Rectangle(50, 50, 400, 100)); FileOutputStream out = new FileOutputStream("title.pptx"); ppt.write(out);//from w w w. ja va2s . c o m out.close(); }