# RtfPageBorders

Page border settings for a document or section.

Class 

`OfficeIMO.Rtf`

**Namespace**

`OfficeIMO.Rtf`

**Assembly**

`OfficeIMO.Rtf`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

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

**Implements**

`IRtfCloneable`

**Modifiers**

sealed

Page border settings for a document or section.

## Inheritance

- object
- RtfPageBorders

## Usage

Explore 2 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 2

- Method [RtfPageBorders.SetDisplayOptions](/api/rtf/officeimo-rtf-rtfpageborders/#method-setdisplayoptions-nullable-officeimo-rtf-rtfpageborderscope-nullable-system-boolean-nullable-officeimo-rtf-rtfpageborderoffset)
- Property [RtfPageSetup.PageBorders](/api/rtf/officeimo-rtf-rtfpagesetup/#property-pageborders)

Filter members 

Show inherited

## Constructors

`public RtfPageBorders()` [#](#constructor-ctor)

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

## Methods

`public RtfPageBorder GetBorder(RtfPageBorderSide side)` [#](#method-getborder-officeimo-rtf-rtfpageborderside)

[RtfPageBorders.cs:52](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfPageBorders.cs#L52)

Returns the page border for the requested side.

Parameters

**side OfficeIMO.Rtf.RtfPageBorderSide required**

Returns

`RtfPageBorder`

`public RtfPageBorders SetDisplayOptions(RtfPageBorderScope? scope = null, bool? displayBehindText = null, RtfPageBorderOffset? offsetFrom = null)` [#](#method-setdisplayoptions-nullable-officeimo-rtf-rtfpageborderscope-nullable-system-boolean-nullable-officeimo-rtf-rtfpageborderoffset)

[RtfPageBorders.cs:42](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfPageBorders.cs#L42)

Sets page-border display options encoded by RTF \pgbrdropt.

Parameters

**scope OfficeIMO.Rtf.RtfPageBorderScope? = null optional**

**displayBehindText bool? = null optional**

**offsetFrom OfficeIMO.Rtf.RtfPageBorderOffset? = null optional**

Returns

`RtfPageBorders`

## 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 RtfPageBorder Top { get; private set; }` [#](#property-top)

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

Top page border.

`public RtfPageBorder Bottom { get; private set; }` [#](#property-bottom)

[RtfPageBorders.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfPageBorders.cs#L11)

Bottom page border.

`public RtfPageBorder Left { get; private set; }` [#](#property-left)

[RtfPageBorders.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfPageBorders.cs#L14)

Left page border.

`public RtfPageBorder Right { get; private set; }` [#](#property-right)

[RtfPageBorders.cs:17](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfPageBorders.cs#L17)

Right page border.

`public bool IncludeHeader { get; set; }` [#](#property-includeheader)

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

Whether the page border surrounds the header area.

`public bool IncludeFooter { get; set; }` [#](#property-includefooter)

[RtfPageBorders.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfPageBorders.cs#L23)

Whether the page border surrounds the footer area.

`public bool SnapToPageBorder { get; set; }` [#](#property-snaptopageborder)

[RtfPageBorders.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfPageBorders.cs#L26)

Whether page border edges should snap to page-border alignment.

`public RtfPageBorderScope? Scope { get; set; }` [#](#property-scope)

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

Page range to which the border applies.

`public bool? DisplayBehindText { get; set; }` [#](#property-displaybehindtext)

[RtfPageBorders.cs:32](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfPageBorders.cs#L32)

Whether the page border is displayed behind document contents.

`public RtfPageBorderOffset? OffsetFrom { get; set; }` [#](#property-offsetfrom)

[RtfPageBorders.cs:35](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfPageBorders.cs#L35)

Source edge used for border spacing.

`public bool HasAnyValue { get; }` [#](#property-hasanyvalue)

[RtfPageBorders.cs:64](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfPageBorders.cs#L64)

Whether any page-border setting is present.

<!-- PowerForge markdown artifact sha256:B3E470E0443491F5F5AFBE0D3602ABAE504CC6C79A044A283867022EAE710EA9 -->
