Hi,
I am trying to insert Shape with text rotate using Aspose.words java latest version, in the saved document, Shape got rotated but text didn’t. Am i doing anything wrong? Please help me !!
public static void main(String[] args) {
Document doc;
try {
doc = new Document();
Shape textBox = new Shape(doc, ShapeType.TEXT_BOX);
textBox.setWrapType(WrapType.NONE);
textBox.setRotation( 345 );
textBox.setHeight( 50.0 );
textBox.setWidth(200.0);
Node test = new Paragraph(doc);
textBox.appendChild( test );
Paragraph para = textBox.getFirstParagraph();
para.getParagraphFormat().setAlignment(ParagraphAlignment.CENTER);
Run run = new Run(doc);
run.setText( "Content in textbox");
para.appendChild(run);
doc.getFirstSection().getBody().getFirstParagraph().appendChild(textBox);
doc.save("/Users/parthi-4272/OfficeWork/DocumentShape.doc");
} catch (Exception e) {
e.printStackTrace();
}
}