LayoutEnumerator class

LayoutEnumerator class

Enumerates page layout entities of a document.

You can use this class to walk over the page layout model. Available properties are type, geometry, text and page index where entity is rendered, as well as overall structure and relationships. Use combination of Aspose.Words.Layout.LayoutCollector.GetEntity(Aspose.Words.Node) and Aspose.Words.Layout.LayoutEnumerator.Current move to the entity which corresponds to a document node. To learn more, visit the Converting to Fixed-page Format documentation article.

Constructors

NameDescription
LayoutEnumerator(document)Initializes new instance of this class.

Properties

NameDescription
documentGets document this instance enumerates.
kindGets the kind of the current entity. This can be an empty string but never null.
pageIndexGets the 1-based index of a page which contains the current entity.
textGets text of the current span entity. Throws for other entity types.
this[]
typeGets the type of the current entity.

Methods

NameDescription
moveFirstChild()Moves to the first child entity.
moveLastChild()Moves to the last child entity.
moveNext()Moves to the next sibling entity in visual order.
moveNextLogical()Moves to the next sibling entity in a logical order.
moveParent()Moves to the parent entity.
moveParent(types)Moves to the parent entity of the specified type.
movePrevious()Moves to the previous sibling entity.
movePreviousLogical()Moves to the previous sibling entity in a logical order.
reset()Moves the enumerator to the first page of the document.

See Also