Hi Team
Please let me know how to add text within the shape(rectangle).
Thanks in advance
String output = "output/shapenew.docx";
Document doc = new Document();
Section sec = doc.addSection();
//add a new paragraph
Paragraph para = sec.addParagraph();
//add textbox
TextBox txtBox = new TextBox(doc);
txtBox.setShapeType(ShapeType.Rectangle);
txtBox.setWidth(100);
txtBox.setHeight(100);
Paragraph paragraph = txtBox.getBody().addParagraph();
paragraph.getFormat().setHorizontalAlignment(HorizontalAlignment.Center);
paragraph.appendText("Start");
txtBox.setHorizontalPosition(100);
txtBox.setVerticalPosition(100);
para.getChildObjects().add(txtBox);
//save the document
doc.saveToFile(output, FileFormat.Docx);