Page 1 of 1

Drawing image and text frame inside another text frame

PostPosted: Thu Apr 04, 2019 7:47 pm
by Madhuri92
Hello,

I want to create a document which will contain a text frame. Inside this text frame, I want to insert one image and text content. Here Idea is to draw a composite frame which can have multiple text and image frame embedded in it. How can I achieve this using docx4j?

I have attached xml sample (zip file) of the required document. However it contains too many nodes and not understanding how to write the java code (using docx4j APIs) to generate it programmatically.

Thanks

Re: Drawing image and text frame inside another text frame

PostPosted: Mon Apr 08, 2019 7:23 pm
by jason
I just used the docx4j code gen on the XML you provided and modified it to use a rel id for a provided image.

Please find working example attached. You'll be able to clean it up to suit your needs, I'm sure....