# RtfPageSetupFluent

The fluent methods of RtfPageSetup, generated from its public properties: A property-named method sets a property and a singular-named method adds…

Class 

`OfficeIMO.Rtf`

**Namespace**

`OfficeIMO.Rtf`

**Assembly**

`OfficeIMO.Rtf`

**Modifiers**

static

The fluent methods of [RtfPageSetup](/api/rtf/officeimo-rtf-rtfpagesetup/), generated from its public properties: A property-named method sets a property and a singular-named method adds to a collection, both returning the same instance.

## Inheritance

- object
- RtfPageSetupFluent

Filter members 

Show inherited

## Methods

`public static RtfPageSetup DifferentFirstPageHeaderFooter(RtfPageSetup rtfPageSetup, bool enabled = true)` [#](#method-differentfirstpageheaderfooter-officeimo-rtf-rtfpagesetup-boolean)

Sets whether first-page header/footer variants should be enabled.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**enabled bool = true optional**

The value.

Returns

`RtfPageSetup` The same instance.

`public static RtfPageSetup DirectDifferentFirstPageHeaderFooter(RtfPageSetup rtfPageSetup, bool? value = true)` [#](#method-directdifferentfirstpageheaderfooter-officeimo-rtf-rtfpagesetup-nullable-system-boolean)

Sets [RtfPageSetup.DirectDifferentFirstPageHeaderFooter](/api/rtf/officeimo-rtf-rtfpagesetup/): Authored first-page header/footer setting. Null inherits the document setting.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**value bool? = true optional**

The value; true when omitted.

Returns

`RtfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property                                                               // C# fluent
new global::OfficeIMO.Rtf.RtfPageSetup { DirectDifferentFirstPageHeaderFooter = value };    rtfPageSetup.DirectDifferentFirstPageHeaderFooter(value);
```

`public static RtfPageSetup DirectLandscape(RtfPageSetup rtfPageSetup, bool? value = true)` [#](#method-directlandscape-officeimo-rtf-rtfpagesetup-nullable-system-boolean)

Sets [RtfPageSetup.DirectLandscape](/api/rtf/officeimo-rtf-rtfpagesetup/): Authored orientation. Null inherits the document's orientation; false explicitly selects portrait.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**value bool? = true optional**

The value; true when omitted.

Returns

`RtfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property                                          // C# fluent
new global::OfficeIMO.Rtf.RtfPageSetup { DirectLandscape = value };    rtfPageSetup.DirectLandscape(value);
```

`public static RtfPageSetup DirectRtlGutter(RtfPageSetup rtfPageSetup, bool? value = true)` [#](#method-directrtlgutter-officeimo-rtf-rtfpagesetup-nullable-system-boolean)

Sets [RtfPageSetup.DirectRtlGutter](/api/rtf/officeimo-rtf-rtfpagesetup/): Authored gutter direction. Null inherits the document setting.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**value bool? = true optional**

The value; true when omitted.

Returns

`RtfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property                                          // C# fluent
new global::OfficeIMO.Rtf.RtfPageSetup { DirectRtlGutter = value };    rtfPageSetup.DirectRtlGutter(value);
```

`public static RtfPageSetup FirstPagePaperSource(RtfPageSetup rtfPageSetup, int? value)` [#](#method-firstpagepapersource-officeimo-rtf-rtfpagesetup-nullable-system-int32)

Sets [RtfPageSetup.FirstPagePaperSource](/api/rtf/officeimo-rtf-rtfpagesetup/): Printer bin source for the first page represented by \binfsxn.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**value int? required**

The value.

Returns

`RtfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property                                               // C# fluent
new global::OfficeIMO.Rtf.RtfPageSetup { FirstPagePaperSource = value };    rtfPageSetup.FirstPagePaperSource(value);
```

`public static RtfPageSetup FooterDistanceTwips(RtfPageSetup rtfPageSetup, int? value)` [#](#method-footerdistancetwips-officeimo-rtf-rtfpagesetup-nullable-system-int32)

Sets [RtfPageSetup.FooterDistanceTwips](/api/rtf/officeimo-rtf-rtfpagesetup/): Footer distance from the bottom edge of the page in twips.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**value int? required**

The value.

Returns

`RtfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property                                              // C# fluent
new global::OfficeIMO.Rtf.RtfPageSetup { FooterDistanceTwips = value };    rtfPageSetup.FooterDistanceTwips(value);
```

`public static RtfPageSetup Gutter(RtfPageSetup rtfPageSetup, int? gutterWidthTwips = null, bool rtlGutter = false)` [#](#method-gutter-officeimo-rtf-rtfpagesetup-nullable-system-int32-boolean)

Sets gutter width in twips.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**gutterWidthTwips int? = null optional**

The value.

**rtlGutter bool = false optional**

The value.

Returns

`RtfPageSetup` The same instance.

`public static RtfPageSetup GutterWidthTwips(RtfPageSetup rtfPageSetup, int? value)` [#](#method-gutterwidthtwips-officeimo-rtf-rtfpagesetup-nullable-system-int32)

Sets [RtfPageSetup.GutterWidthTwips](/api/rtf/officeimo-rtf-rtfpagesetup/): Gutter width in twips.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**value int? required**

The value.

Returns

`RtfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property                                           // C# fluent
new global::OfficeIMO.Rtf.RtfPageSetup { GutterWidthTwips = value };    rtfPageSetup.GutterWidthTwips(value);
```

`public static RtfPageSetup HeaderDistanceTwips(RtfPageSetup rtfPageSetup, int? value)` [#](#method-headerdistancetwips-officeimo-rtf-rtfpagesetup-nullable-system-int32)

Sets [RtfPageSetup.HeaderDistanceTwips](/api/rtf/officeimo-rtf-rtfpagesetup/): Header distance from the top edge of the page in twips.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**value int? required**

The value.

Returns

`RtfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property                                              // C# fluent
new global::OfficeIMO.Rtf.RtfPageSetup { HeaderDistanceTwips = value };    rtfPageSetup.HeaderDistanceTwips(value);
```

`public static RtfPageSetup HeaderFooterDistance(RtfPageSetup rtfPageSetup, int? headerDistanceTwips = null, int? footerDistanceTwips = null)` [#](#method-headerfooterdistance-officeimo-rtf-rtfpagesetup-nullable-system-int32-nullable-system-int32)

Sets header and footer distances from the page edges in twips.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**headerDistanceTwips int? = null optional**

The value.

**footerDistanceTwips int? = null optional**

The value.

Returns

`RtfPageSetup` The same instance.

`public static RtfPageSetup Landscape(RtfPageSetup rtfPageSetup, bool landscape = true)` [#](#method-landscape-officeimo-rtf-rtfpagesetup-boolean)

Sets whether landscape orientation should be emitted.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**landscape bool = true optional**

The value.

Returns

`RtfPageSetup` The same instance.

`public static RtfPageSetup MarginBottomTwips(RtfPageSetup rtfPageSetup, int? value)` [#](#method-marginbottomtwips-officeimo-rtf-rtfpagesetup-nullable-system-int32)

Sets [RtfPageSetup.MarginBottomTwips](/api/rtf/officeimo-rtf-rtfpagesetup/): Bottom margin in twips.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**value int? required**

The value.

Returns

`RtfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property                                            // C# fluent
new global::OfficeIMO.Rtf.RtfPageSetup { MarginBottomTwips = value };    rtfPageSetup.MarginBottomTwips(value);
```

`public static RtfPageSetup MarginLeftTwips(RtfPageSetup rtfPageSetup, int? value)` [#](#method-marginlefttwips-officeimo-rtf-rtfpagesetup-nullable-system-int32)

Sets [RtfPageSetup.MarginLeftTwips](/api/rtf/officeimo-rtf-rtfpagesetup/): Left margin in twips.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**value int? required**

The value.

Returns

`RtfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property                                          // C# fluent
new global::OfficeIMO.Rtf.RtfPageSetup { MarginLeftTwips = value };    rtfPageSetup.MarginLeftTwips(value);
```

`public static RtfPageSetup MarginRightTwips(RtfPageSetup rtfPageSetup, int? value)` [#](#method-marginrighttwips-officeimo-rtf-rtfpagesetup-nullable-system-int32)

Sets [RtfPageSetup.MarginRightTwips](/api/rtf/officeimo-rtf-rtfpagesetup/): Right margin in twips.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**value int? required**

The value.

Returns

`RtfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property                                           // C# fluent
new global::OfficeIMO.Rtf.RtfPageSetup { MarginRightTwips = value };    rtfPageSetup.MarginRightTwips(value);
```

`public static RtfPageSetup Margins(RtfPageSetup rtfPageSetup, int? leftTwips = null, int? rightTwips = null, int? topTwips = null, int? bottomTwips = null)` [#](#method-margins-officeimo-rtf-rtfpagesetup-nullable-system-int32-nullable-system-int32-nullable-system-int32-nullable-system-int32)

Sets document margins in twips.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**leftTwips int? = null optional**

The value.

**rightTwips int? = null optional**

The value.

**topTwips int? = null optional**

The value.

**bottomTwips int? = null optional**

The value.

Returns

`RtfPageSetup` The same instance.

`public static RtfPageSetup MarginTopTwips(RtfPageSetup rtfPageSetup, int? value)` [#](#method-margintoptwips-officeimo-rtf-rtfpagesetup-nullable-system-int32)

Sets [RtfPageSetup.MarginTopTwips](/api/rtf/officeimo-rtf-rtfpagesetup/): Top margin in twips.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**value int? required**

The value.

Returns

`RtfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property                                         // C# fluent
new global::OfficeIMO.Rtf.RtfPageSetup { MarginTopTwips = value };    rtfPageSetup.MarginTopTwips(value);
```

`public static RtfPageSetup OtherPagesPaperSource(RtfPageSetup rtfPageSetup, int? value)` [#](#method-otherpagespapersource-officeimo-rtf-rtfpagesetup-nullable-system-int32)

Sets [RtfPageSetup.OtherPagesPaperSource](/api/rtf/officeimo-rtf-rtfpagesetup/): Printer bin source for subsequent pages represented by \binsxn.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**value int? required**

The value.

Returns

`RtfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property                                                // C# fluent
new global::OfficeIMO.Rtf.RtfPageSetup { OtherPagesPaperSource = value };    rtfPageSetup.OtherPagesPaperSource(value);
```

`public static RtfPageSetup PageBorders(RtfPageSetup rtfPageSetup, Action<RtfPageBorders> configure)` [#](#method-pageborders-officeimo-rtf-rtfpagesetup-action-officeimo-rtf-rtfpageborders)

Configures [RtfPageSetup.PageBorders](/api/rtf/officeimo-rtf-rtfpagesetup/) in place: Page border settings.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**configure System.Action<OfficeIMO.Rtf.RtfPageBorders> required**

Configures the value.

Returns

`RtfPageSetup` The same instance.

`public static RtfPageSetup PageNumberFormat(RtfPageSetup rtfPageSetup, RtfPageNumberFormat? value)` [#](#method-pagenumberformat-officeimo-rtf-rtfpagesetup-nullable-officeimo-rtf-rtfpagenumberformat)

Sets [RtfPageSetup.PageNumberFormat](/api/rtf/officeimo-rtf-rtfpagesetup/): Page-number display format.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**value OfficeIMO.Rtf.RtfPageNumberFormat? required**

The value.

Returns

`RtfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property                                           // C# fluent
new global::OfficeIMO.Rtf.RtfPageSetup { PageNumberFormat = value };    rtfPageSetup.PageNumberFormat(value);
```

`public static RtfPageSetup PageNumbering(RtfPageSetup rtfPageSetup, int? start = null, bool? restart = null, RtfPageNumberFormat? format = null, int? positionXTwips = null, int? positionYTwips = null)` [#](#method-pagenumbering-officeimo-rtf-rtfpagesetup-nullable-system-int32-nullable-system-boolean-nullable-officeimo-rtf-rtfpagenumberformat-nullable-system-int32-nullable-system-int32)

Sets page numbering controls.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**start int? = null optional**

The value.

**restart bool? = null optional**

The value.

**format OfficeIMO.Rtf.RtfPageNumberFormat? = null optional**

The value.

**positionXTwips int? = null optional**

The value.

**positionYTwips int? = null optional**

The value.

Returns

`RtfPageSetup` The same instance.

`public static RtfPageSetup PageNumberPositionXTwips(RtfPageSetup rtfPageSetup, int? value)` [#](#method-pagenumberpositionxtwips-officeimo-rtf-rtfpagesetup-nullable-system-int32)

Sets [RtfPageSetup.PageNumberPositionXTwips](/api/rtf/officeimo-rtf-rtfpagesetup/): Horizontal page-number position in twips from the right margin.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**value int? required**

The value.

Returns

`RtfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property                                                   // C# fluent
new global::OfficeIMO.Rtf.RtfPageSetup { PageNumberPositionXTwips = value };    rtfPageSetup.PageNumberPositionXTwips(value);
```

`public static RtfPageSetup PageNumberPositionYTwips(RtfPageSetup rtfPageSetup, int? value)` [#](#method-pagenumberpositionytwips-officeimo-rtf-rtfpagesetup-nullable-system-int32)

Sets [RtfPageSetup.PageNumberPositionYTwips](/api/rtf/officeimo-rtf-rtfpagesetup/): Vertical page-number position in twips from the top margin.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**value int? required**

The value.

Returns

`RtfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property                                                   // C# fluent
new global::OfficeIMO.Rtf.RtfPageSetup { PageNumberPositionYTwips = value };    rtfPageSetup.PageNumberPositionYTwips(value);
```

`public static RtfPageSetup PageNumberRestart(RtfPageSetup rtfPageSetup, bool? value = true)` [#](#method-pagenumberrestart-officeimo-rtf-rtfpagesetup-nullable-system-boolean)

Sets [RtfPageSetup.PageNumberRestart](/api/rtf/officeimo-rtf-rtfpagesetup/): Whether page numbering restarts in this page setup. false represents continuous numbering.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**value bool? = true optional**

The value; true when omitted.

Returns

`RtfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property                                            // C# fluent
new global::OfficeIMO.Rtf.RtfPageSetup { PageNumberRestart = value };    rtfPageSetup.PageNumberRestart(value);
```

`public static RtfPageSetup PageNumberStart(RtfPageSetup rtfPageSetup, int? value)` [#](#method-pagenumberstart-officeimo-rtf-rtfpagesetup-nullable-system-int32)

Sets [RtfPageSetup.PageNumberStart](/api/rtf/officeimo-rtf-rtfpagesetup/): Beginning page number.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**value int? required**

The value.

Returns

`RtfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property                                          // C# fluent
new global::OfficeIMO.Rtf.RtfPageSetup { PageNumberStart = value };    rtfPageSetup.PageNumberStart(value);
```

`public static RtfPageSetup PaperHeightTwips(RtfPageSetup rtfPageSetup, int? value)` [#](#method-paperheighttwips-officeimo-rtf-rtfpagesetup-nullable-system-int32)

Sets [RtfPageSetup.PaperHeightTwips](/api/rtf/officeimo-rtf-rtfpagesetup/): Paper height in twips.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**value int? required**

The value.

Returns

`RtfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property                                           // C# fluent
new global::OfficeIMO.Rtf.RtfPageSetup { PaperHeightTwips = value };    rtfPageSetup.PaperHeightTwips(value);
```

`public static RtfPageSetup PaperSize(RtfPageSetup rtfPageSetup, int widthTwips, int heightTwips)` [#](#method-papersize-officeimo-rtf-rtfpagesetup-int32-int32)

Sets paper size in twips.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**widthTwips int required**

The value.

**heightTwips int required**

The value.

Returns

`RtfPageSetup` The same instance.

`public static RtfPageSetup PaperWidthTwips(RtfPageSetup rtfPageSetup, int? value)` [#](#method-paperwidthtwips-officeimo-rtf-rtfpagesetup-nullable-system-int32)

Sets [RtfPageSetup.PaperWidthTwips](/api/rtf/officeimo-rtf-rtfpagesetup/): Paper width in twips.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**value int? required**

The value.

Returns

`RtfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property                                          // C# fluent
new global::OfficeIMO.Rtf.RtfPageSetup { PaperWidthTwips = value };    rtfPageSetup.PaperWidthTwips(value);
```

`public static RtfPageSetup PrinterPaper(RtfPageSetup rtfPageSetup, int? paperSize = null, int? firstPageSource = null, int? otherPagesSource = null)` [#](#method-printerpaper-officeimo-rtf-rtfpagesetup-nullable-system-int32-nullable-system-int32-nullable-system-int32)

Sets printer-specific paper metadata.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**paperSize int? = null optional**

The value.

**firstPageSource int? = null optional**

The value.

**otherPagesSource int? = null optional**

The value.

Returns

`RtfPageSetup` The same instance.

`public static RtfPageSetup PrinterPaperSize(RtfPageSetup rtfPageSetup, int? value)` [#](#method-printerpapersize-officeimo-rtf-rtfpagesetup-nullable-system-int32)

Sets [RtfPageSetup.PrinterPaperSize](/api/rtf/officeimo-rtf-rtfpagesetup/): Printer paper size code represented by \psz.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**value int? required**

The value.

Returns

`RtfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property                                           // C# fluent
new global::OfficeIMO.Rtf.RtfPageSetup { PrinterPaperSize = value };    rtfPageSetup.PrinterPaperSize(value);
```

`public static RtfPageSetup RtlGutter(RtfPageSetup rtfPageSetup, bool value = true)` [#](#method-rtlgutter-officeimo-rtf-rtfpagesetup-boolean)

Sets [RtfPageSetup.RtlGutter](/api/rtf/officeimo-rtf-rtfpagesetup/): Whether the gutter should be positioned on the right side.

Parameters

**rtfPageSetup OfficeIMO.Rtf.RtfPageSetup required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`RtfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property                                    // C# fluent
new global::OfficeIMO.Rtf.RtfPageSetup { RtlGutter = value };    rtfPageSetup.RtlGutter(value);
```

## 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?`

<!-- PowerForge markdown artifact sha256:521A181ACBDE0A81A77FFEEC7C84ACE58C50A282769F5BA6098DFE49C2524B90 -->
