Free Support Forum -

How to set the width of DrawingML is according to one or two DrawingML

I have two questions:

1.There are one picture or two pictures. These two shapes are placed side by side.<?xml:namespace prefix = o ns = “urn:schemas-microsoft-com:office:office” /><o:p></o:p>

If there is one picture,
I want to se
t the shape width is equal to the width of the page<o:p></o:p>

If there are two pictures, I want to set each shape width is equal to half of the width of
the page

<o:p></o:p> can set Aspose.Words.Drawing.DrawingML WrapType.TopBottom,DrawingML have not this function, but Aspose.Words.Drawing.ShapeAspose.Words.Drawing.Shape have WrapType.TopBottom

can you help me?thanks


Thanks for your inquiry.

What I understand you mean a couple of consecutive DrawingML nodes when saying two side by side pictures and if this is found to be the case you can examine the left, top, width and height of each DrawingML and adjust their widths as per your needs. I have attached a modified version of DocumentLayoutHelper project here for your reference (original project can be downloaded from here). This project returns the Rectangles for each DrawingML node in your document. I hope, this helps.

Secondly, we will consider exposing Shape properties for DrawingML objects in future. Please follow this thread for further proceedings.

Best regards,