Table of Contents

Method GetElements

Namespace
MigraDoc.DocumentObjectModel.Visitors
Assembly
MigraDoc.DocumentObjectModel.dll

GetElements(DocumentObject, bool)

Gets the elements/sections/rows/cells of a DocumentObject.

public static IEnumerable<DocumentObject?> GetElements(this DocumentObject documentObject, bool includeHeaderFooter = false)

Parameters

documentObject DocumentObject

The DocumentObject.

includeHeaderFooter bool

Shall headers and footers also be returned. No effect for DocumentObjects that neither are nor contain Sections.

Returns

IEnumerable<DocumentObject>

GetElements<T>(DocumentObject, bool)

Gets the elements/sections/rows/cells of Type T of a DocumentObject.

public static IEnumerable<T> GetElements<T>(this DocumentObject documentObject, bool includeHeaderFooter = false) where T : DocumentObject

Parameters

documentObject DocumentObject

The DocumentObject.

includeHeaderFooter bool

Shall headers and footers also be returned. No effect for DocumentObjects that neither are nor contain Sections.

Returns

IEnumerable<T>

Type Parameters

T