We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Creating a Shape

I would like to create an Ellipse Shape that will be inserted into a line of text. I am unsure of how to accomplish 2 things:

1) I want the ellipse to be the same height as the text.
2) I want the text to be aware of the ellipse so that adding more text before the shape causes it to move rather than just hide behind or go in front of the shape.

I’d really appreciate any help with this.

Thank you,


Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. I think that you should make shape to be inline with text. Please try using the following code:

//Create document

Document doc = new Document();

//Create DocumentBuilder

DocumentBuilder builder = new DocumentBuilder(doc);

//Insert some text

builder.Write("This is text before shape");

//Create elipse shape

Shape elipse = new Shape(doc, ShapeType.Ellipse);

//Set size of shape

elipse.Width = 12;

elipse.Height = 12;

//Set WrapType

elipse.WrapType = WrapType.Inline;

//Insert shape into the document


//Insert some text

builder.Write("Some text sfter shape");

//Save document


I hope this helps.

Best regards.