# PdfPageSetupFluent

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

Class 

`OfficeIMO.Pdf`

**Namespace**

`OfficeIMO.Pdf`

**Assembly**

`OfficeIMO.Pdf`

**Modifiers**

static

The fluent methods of [PdfPageSetup](/api/pdf/officeimo-pdf-pdfpagesetup/), 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
- PdfPageSetupFluent

Filter members 

Show inherited

## Methods

`public static PdfPageSetup DifferentFirstPage(PdfPageSetup pdfPageSetup, bool value = true)` [#](#method-differentfirstpage-officeimo-pdf-pdfpagesetup-boolean)

Sets [PdfPageSetup.DifferentFirstPage](/api/pdf/officeimo-pdf-pdfpagesetup/): When true, page 1 of each section uses [PdfPageSetup.FirstPageHeader](/api/pdf/officeimo-pdf-pdfpagesetup/) and [PdfPageSetup.FirstPageFooter](/api/pdf/officeimo-pdf-pdfpagesetup/).

Parameters

**pdfPageSetup OfficeIMO.Pdf.PdfPageSetup required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`PdfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property               // C# fluent
pdfPageSetup.DifferentFirstPage = value;    pdfPageSetup.DifferentFirstPage(value);
```

`public static PdfPageSetup DifferentOddAndEvenPages(PdfPageSetup pdfPageSetup, bool value = true)` [#](#method-differentoddandevenpages-officeimo-pdf-pdfpagesetup-boolean)

Sets [PdfPageSetup.DifferentOddAndEvenPages](/api/pdf/officeimo-pdf-pdfpagesetup/): When true, even pages use [PdfPageSetup.EvenPageHeader](/api/pdf/officeimo-pdf-pdfpagesetup/) and [PdfPageSetup.EvenPageFooter](/api/pdf/officeimo-pdf-pdfpagesetup/).

Parameters

**pdfPageSetup OfficeIMO.Pdf.PdfPageSetup required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`PdfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property                     // C# fluent
pdfPageSetup.DifferentOddAndEvenPages = value;    pdfPageSetup.DifferentOddAndEvenPages(value);
```

`public static PdfPageSetup Margins(PdfPageSetup pdfPageSetup, PdfPageMargins margins)` [#](#method-margins-officeimo-pdf-pdfpagesetup-officeimo-pdf-pdfpagemargins)

Sets all four margins from a reusable value, such as [PdfPageMargins.Moderate](/api/pdf/officeimo-pdf-pdfpagemargins/).

Parameters

**pdfPageSetup OfficeIMO.Pdf.PdfPageSetup required**

The instance.

**margins OfficeIMO.Pdf.PdfPageMargins required**

The value.

Returns

`PdfPageSetup` The same instance.

`public static PdfPageSetup MirrorMargins(PdfPageSetup pdfPageSetup, bool value = true)` [#](#method-mirrormargins-officeimo-pdf-pdfpagesetup-boolean)

Sets [PdfPageSetup.MirrorMargins](/api/pdf/officeimo-pdf-pdfpagesetup/): Swaps the left and right margins on even visible page numbers. Numbering starts and restarts determine parity.

Parameters

**pdfPageSetup OfficeIMO.Pdf.PdfPageSetup required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`PdfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property          // C# fluent
pdfPageSetup.MirrorMargins = value;    pdfPageSetup.MirrorMargins(value);
```

`public static PdfPageSetup Orientation(PdfPageSetup pdfPageSetup, OfficePageOrientation value)` [#](#method-orientation-officeimo-pdf-pdfpagesetup-officeimo-officepageorientation)

Sets [PdfPageSetup.Orientation](/api/pdf/officeimo-pdf-pdfpagesetup/): Gets or sets the page orientation. Setting it swaps the page width and height when needed.

Parameters

**pdfPageSetup OfficeIMO.Pdf.PdfPageSetup required**

The instance.

**value OfficeIMO.OfficePageOrientation required**

The value.

Returns

`PdfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property        // C# fluent
pdfPageSetup.Orientation = value;    pdfPageSetup.Orientation(value);
```

`public static PdfPageSetup Size(PdfPageSetup pdfPageSetup, PdfPageSize value)` [#](#method-size-officeimo-pdf-pdfpagesetup-officeimo-pdf-pdfpagesize)

Sets [PdfPageSetup.Size](/api/pdf/officeimo-pdf-pdfpagesetup/): Gets or sets the page size. Default is Letter (612 by 792 points).

Parameters

**pdfPageSetup OfficeIMO.Pdf.PdfPageSetup required**

The instance.

**value OfficeIMO.Pdf.PdfPageSize required**

The value.

Returns

`PdfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property    // C# fluent
pdfPageSetup.Size = value;       pdfPageSetup.Size(value);
```

`public static PdfPageSetup UseVisiblePageNumberParity(PdfPageSetup pdfPageSetup, bool value = true)` [#](#method-usevisiblepagenumberparity-officeimo-pdf-pdfpagesetup-boolean)

Sets [PdfPageSetup.UseVisiblePageNumberParity](/api/pdf/officeimo-pdf-pdfpagesetup/): Uses visible page-number parity for odd/even headers, footers and watermarks. First-page variants still refer to the first physical page of each section. The default uses section-relative page parity.

Parameters

**pdfPageSetup OfficeIMO.Pdf.PdfPageSetup required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`PdfPageSetup` The same instance.

Examples

```csharp
// C# initializer or property                       // C# fluent
pdfPageSetup.UseVisiblePageNumberParity = value;    pdfPageSetup.UseVisiblePageNumberParity(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:D816F594F4636AD1052AF945C9BF4E3D12B3D9F74CB1390335B35CE681ED0D1C -->
