Free Support Forum - aspose.com

Text box support

Hello,

I am currently looking for a way of extracting text from word documents without having Word installed.

But I have a strong constraint about text boxes. I read the API reference but I did not notice anything about it.



Does Aspose.Word support text boxes ? Does it support their positionning ?



Thanks,

Freddy

At the moment all drawing objects including textboxes are represented in Aspose.Word Object Model as Shape objects. The Shape class derives from InlineStory and can contain Paragraph and Table objects that contain text of the shape (not only textboxes can contain text, any shape can contain text in a Word document). So you can retrieve text of a textbox or a shape easily, you can either do Shape.GetText() to retrieve plain text or you can enumerate through child nodes of the Shape object and examine them individually.

Positioning and other shape properties - some are available, for example Left, Top, Width, Height etc, but not all. We are in the process of improving the Aspose.Word Object Model to provide rich set of classes and properties to deal with all shapes, drawing objects and textboxes.

Thanks a lot Roman :slight_smile: