Free Support Forum - aspose.com

Insert Image in position

Hello, As I can insert an image in same position that another one image?

I have:

Shape shape=(Shape)doc.GetChild(NodeType.Shape,1,true);
DocumentBuilder builder = new DocumentBuilder(doc);
builder.MoveTo(shape);
builder.InsertImage(MyBmp,RelativeHorizontalPosition.Column,0,
RelativeVerticalPosition.Line,0,shape.Width,
shape.Height,WrapType.Square,WrapSide.Both,false,null);
doc.ChildNodes.Remove(shape);

The shape have WrapType.Square, then in the insertImage I write the same, but I don’t know the parametres “RelativeHorizontalPosition”, “left”,“RelativeVerticalPosition” and “top” exactly. MyBmp has the same size than shape.

As I can obtain the exact coordinates of the shape in order to include them in function InsertImage???

In my document I have:

Text Text Text Image(shape) Text Text

And I want to replace the sape by MyBmp in the same position

Thanksss!!!

Hi,

Thank you for considering Aspose.

Unfortunately this task doesn’t seem to be possible at the moment. However, we are going to add possibility of operating image data instead of replacing nodes which will probably be implemented in October.

OK,
Thank you very much by everything. As it finds out to me this update. I need for a project :frowning:

Thanks

This functionality is now available in Aspose.Words 4.0 version. Please inform me if you need any assistance with employing this new functionality.

Best regards,