Page 1 of 1

create rectangle shape using org.docx4j.wml.Drawing class

PostPosted: Mon May 14, 2018 8:52 pm
by gosavi_pankaj
Hi ,
i want to create shape of rectangle using org.docx4j.wml.Drawing class.
Help is appreciated.

regards,
Pankaj G

Re: create rectangle shape using org.docx4j.wml.Drawing clas

PostPosted: Mon May 14, 2018 9:41 pm
by jason
Just create it in Word, then save, then use the Docx4j Helper Word AddIn or the docx4j webapp, to generate corresponding code.

Re: create rectangle shape using org.docx4j.wml.Drawing clas

PostPosted: Tue May 15, 2018 1:05 am
by gosavi_pankaj
Hi Jasson,
Thanks for your reply. I alreeady tried it but it generates code which creates textbox instead of shape.
But I want shape as I want to rotate the text.

Regards,
Pankaj G

Re: create rectangle shape using org.docx4j.wml.Drawing clas

PostPosted: Wed May 16, 2018 9:05 pm
by gosavi_pankaj
Hi Jasson,
I am able to generate error free word document. But facing challenge with <wps:wsp><wps:cNvSpPr txBox="1"/> tag. Can you explore which class it corresponds in docx4j. I will like it to add in graphicData object.

Regards,
Pankaj G