# RtfSection

Semantic RTF section containing ordered document blocks and section-level page layout.

Class 

`OfficeIMO.Rtf`

**Namespace**

`OfficeIMO.Rtf`

**Assembly**

`OfficeIMO.Rtf`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[RtfSection.cs:50](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfSection.cs#L50)

**Implements**

`IRtfCloneable`

**Modifiers**

sealed

Semantic RTF section containing ordered document blocks and section-level page layout.

## Inheritance

- object
- RtfSection

## Usage

Explore 7 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 5

- Method [RtfDocument.AddSection](/api/rtf/officeimo-rtf-rtfdocument/#method-addsection-officeimo-rtf-rtfsectionbreakkind)
- Property [RtfDocument.Sections](/api/rtf/officeimo-rtf-rtfdocument/#property-sections)
- Method [RtfSection.ClearColumns](/api/rtf/officeimo-rtf-rtfsection/#method-clearcolumns)
- Method [RtfSection.SetDirection](/api/rtf/officeimo-rtf-rtfsection/#method-setdirection-nullable-officeimo-rtf-rtftextdirection)
- Method [RtfSection.SetVerticalAlignment](/api/rtf/officeimo-rtf-rtfsection/#method-setverticalalignment-nullable-officeimo-rtf-rtfsectionverticalalignment)

### Accepted by parameters 2

- Method [RtfDocument.GetEffectiveHeaderFooters](/api/rtf/officeimo-rtf-rtfdocument/#method-geteffectiveheaderfooters-officeimo-rtf-rtfsection) parameter `section`
- Method [RtfDocument.GetEffectivePageSetup](/api/rtf/officeimo-rtf-rtfdocument/#method-geteffectivepagesetup-officeimo-rtf-rtfsection) parameter `section`

Filter members 

Show inherited

## Methods

`public RtfSectionColumn AddColumn(int? widthTwips = null, int? spaceAfterTwips = null)` [#](#method-addcolumn-nullable-system-int32-nullable-system-int32)

[RtfSection.cs:62](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfSection.cs#L62)

Adds an unequal section column definition.

Parameters

**widthTwips int? = null optional**

**spaceAfterTwips int? = null optional**

Returns

`RtfSectionColumn`

`public RtfHeaderFooter AddFooter(RtfHeaderFooterKind kind = Footer)` [#](#method-addfooter-officeimo-rtf-rtfheaderfooterkind)

[RtfSection.HeaderFooters.cs:29](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfSection.HeaderFooters.cs#L29)

Adds a footer to this section.

Parameters

**kind OfficeIMO.Rtf.RtfHeaderFooterKind = Footer optional**

Returns

`RtfHeaderFooter`

`public RtfHeaderFooter AddHeader(RtfHeaderFooterKind kind = Header)` [#](#method-addheader-officeimo-rtf-rtfheaderfooterkind)

[RtfSection.HeaderFooters.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfSection.HeaderFooters.cs#L20)

Adds a header to this section.

Parameters

**kind OfficeIMO.Rtf.RtfHeaderFooterKind = Header optional**

Returns

`RtfHeaderFooter`

`public RtfHeaderFooter AddHeaderFooter(RtfHeaderFooterKind kind)` [#](#method-addheaderfooter-officeimo-rtf-rtfheaderfooterkind)

[RtfSection.HeaderFooters.cs:12](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfSection.HeaderFooters.cs#L12)

Adds an explicit section header or footer. An empty destination clears inherited content for that kind.

Parameters

**kind OfficeIMO.Rtf.RtfHeaderFooterKind required**

Returns

`RtfHeaderFooter`

`public RtfImage AddImage(RtfImageFormat format, byte[] data)` [#](#method-addimage-officeimo-rtf-rtfimageformat-byte)

[RtfSection.cs:106](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfSection.cs#L106)

Adds a picture block to the section.

Parameters

**format OfficeIMO.Rtf.RtfImageFormat required**

**data byte[] required**

Returns

`RtfImage`

`public RtfParagraph AddParagraph(string? text = null)` [#](#method-addparagraph-string)

[RtfSection.cs:75](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfSection.cs#L75)

Adds a paragraph to the section.

Parameters

**text string? = null optional**

Returns

`RtfParagraph`

`public RtfTable AddTable(int rows, int columns)` [#](#method-addtable-int32-int32)

[RtfSection.cs:87](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfSection.cs#L87)

Adds a table block to the section.

Parameters

**rows int required**

**columns int required**

Returns

`RtfTable`

`public RtfSection ClearColumns()` [#](#method-clearcolumns)

[RtfSection.cs:69](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfSection.cs#L69)

Clears unequal section column definitions.

Returns

`RtfSection`

`public RtfSection SetDirection(RtfTextDirection? direction)` [#](#method-setdirection-nullable-officeimo-rtf-rtftextdirection)

[RtfSection.cs:56](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfSection.cs#L56)

Sets the section text direction.

Parameters

**direction OfficeIMO.Rtf.RtfTextDirection? required**

Returns

`RtfSection`

`public RtfSection SetVerticalAlignment(RtfSectionVerticalAlignment? alignment)` [#](#method-setverticalalignment-nullable-officeimo-rtf-rtfsectionverticalalignment)

[RtfSection.cs:50](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfSection.cs#L50)

Sets vertical text alignment for pages in the section.

Parameters

**alignment OfficeIMO.Rtf.RtfSectionVerticalAlignment? required**

Returns

`RtfSection`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public IReadOnlyList<IRtfBlock> Blocks { get; }` [#](#property-blocks)

[RtfSection.cs:16](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfSection.cs#L16)

Ordered blocks contained by the section.

`public RtfPageSetup PageSetup { get; private set; }` [#](#property-pagesetup)

[RtfSection.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfSection.cs#L19)

Section page size, margins, and orientation.

`public RtfNoteSettings NoteSettings { get; private set; }` [#](#property-notesettings)

[RtfSection.cs:22](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfSection.cs#L22)

Section-level footnote and endnote numbering settings.

`public RtfSectionBreakKind BreakKind { get; set; }` [#](#property-breakkind)

[RtfSection.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfSection.cs#L25)

Section break behavior.

`public int? ColumnCount { get; set; }` [#](#property-columncount)

[RtfSection.cs:28](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfSection.cs#L28)

Number of text columns in the section.

`public int? ColumnSpaceTwips { get; set; }` [#](#property-columnspacetwips)

[RtfSection.cs:31](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfSection.cs#L31)

Space between section columns in twips.

`public bool ColumnSeparator { get; set; }` [#](#property-columnseparator)

[RtfSection.cs:34](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfSection.cs#L34)

Whether a vertical separator line is shown between columns.

`public IReadOnlyList<RtfSectionColumn> Columns { get; }` [#](#property-columns)

[RtfSection.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfSection.cs#L37)

Unequal section column definitions in section order.

`public RtfLineNumbering LineNumbering { get; private set; }` [#](#property-linenumbering)

[RtfSection.cs:40](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfSection.cs#L40)

Section line-numbering settings.

`public RtfSectionVerticalAlignment? VerticalAlignment { get; set; }` [#](#property-verticalalignment)

[RtfSection.cs:43](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfSection.cs#L43)

Vertical text alignment for pages in the section.

`public RtfTextDirection? Direction { get; set; }` [#](#property-direction)

[RtfSection.cs:46](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfSection.cs#L46)

Section text direction represented by \ltrsect or \rtlsect.

`public IReadOnlyList<RtfHeaderFooter> HeaderFooters { get; }` [#](#property-headerfooters)

[RtfSection.HeaderFooters.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfSection.HeaderFooters.cs#L8)

Headers and footers explicitly declared by this section. Missing kinds inherit from preceding sections.

<!-- PowerForge markdown artifact sha256:463E4D1C9CEF384EBDAB1F0B9BDAF4DA549F245A0634CE21C5D6A6267E9D3AEA -->
