Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

PdfHeaderFooterFluent

OfficeIMO.Pdf

Namespace
OfficeIMO.Pdf
Assembly
OfficeIMO.Pdf
Modifiers
static

The fluent methods of PdfHeaderFooter, 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
  • PdfHeaderFooterFluent

Methods

public static PdfHeaderFooter Alignment(PdfHeaderFooter pdfHeaderFooter, OfficeAlignment value) #

Sets PdfHeaderFooter.Alignment: Horizontal alignment: left, center (default) or right.

Parameters

pdfHeaderFooter OfficeIMO.Pdf.PdfHeaderFooter required
The instance.
value OfficeIMO.OfficeAlignment required
The value.

Returns

PdfHeaderFooter The same instance.

Examples

// C# initializer or property         // C# fluent
pdfHeaderFooter.Alignment = value;    pdfHeaderFooter.Alignment(value);
public static PdfHeaderFooter Color(PdfHeaderFooter pdfHeaderFooter, OfficeColor? value) #

Sets PdfHeaderFooter.Color: Text color. When null, headers keep the current PDF fill color and footers follow the theme footer color.

Parameters

pdfHeaderFooter OfficeIMO.Pdf.PdfHeaderFooter required
The instance.
value OfficeIMO.OfficeColor? required
The value.

Returns

PdfHeaderFooter The same instance.

Examples

// C# initializer or property     // C# fluent
pdfHeaderFooter.Color = value;    pdfHeaderFooter.Color(value);
public static PdfHeaderFooter FontFamily(PdfHeaderFooter pdfHeaderFooter, string? value) #

Sets PdfHeaderFooter.FontFamily: Optional registered named font family. When null, PdfHeaderFooter.StandardFont is used.

Parameters

pdfHeaderFooter OfficeIMO.Pdf.PdfHeaderFooter required
The instance.
value string? required
The value.

Returns

PdfHeaderFooter The same instance.

Examples

// C# initializer or property          // C# fluent
pdfHeaderFooter.FontFamily = value;    pdfHeaderFooter.FontFamily(value);
public static PdfHeaderFooter FontSize(PdfHeaderFooter pdfHeaderFooter, OfficeLength value) #

Sets PdfHeaderFooter.FontSize: Font size. Headers default to 9 points; footers follow the theme footer size.

Parameters

pdfHeaderFooter OfficeIMO.Pdf.PdfHeaderFooter required
The instance.
value OfficeIMO.OfficeLength required
The value.

Returns

PdfHeaderFooter The same instance.

Examples

// C# initializer or property        // C# fluent
pdfHeaderFooter.FontSize = value;    pdfHeaderFooter.FontSize(value);
public static PdfHeaderFooter Format(PdfHeaderFooter pdfHeaderFooter, string value) #

Sets PdfHeaderFooter.Format: Text format with {page} and {pages} tokens. The running footer defaults to "Page {page} of {pages}"; other slots default to empty.

Parameters

pdfHeaderFooter OfficeIMO.Pdf.PdfHeaderFooter required
The instance.
value string required
The value.

Returns

PdfHeaderFooter The same instance.

Examples

// C# initializer or property      // C# fluent
pdfHeaderFooter.Format = value;    pdfHeaderFooter.Format(value);
public static PdfHeaderFooter Offset(PdfHeaderFooter pdfHeaderFooter, OfficeLength value) #

Sets PdfHeaderFooter.Offset: Baseline distance from the margin: above the top margin for headers, below the bottom margin for footers. Default 18 points.

Parameters

pdfHeaderFooter OfficeIMO.Pdf.PdfHeaderFooter required
The instance.
value OfficeIMO.OfficeLength required
The value.

Returns

PdfHeaderFooter The same instance.

Examples

// C# initializer or property      // C# fluent
pdfHeaderFooter.Offset = value;    pdfHeaderFooter.Offset(value);
public static PdfHeaderFooter Segments(PdfHeaderFooter pdfHeaderFooter, IReadOnlyList<PdfFooterSegment>? value) #

Sets PdfHeaderFooter.Segments: Styled text and page-token segments. When set, they replace PdfHeaderFooter.Format.

Parameters

pdfHeaderFooter OfficeIMO.Pdf.PdfHeaderFooter required
The instance.
value System.Collections.Generic.IReadOnlyList<OfficeIMO.Pdf.PdfFooterSegment>? required
The value.

Returns

PdfHeaderFooter The same instance.

Examples

// C# initializer or property        // C# fluent
pdfHeaderFooter.Segments = value;    pdfHeaderFooter.Segments(value);
public static PdfHeaderFooter Show(PdfHeaderFooter pdfHeaderFooter, bool value = true) #

Sets PdfHeaderFooter.Show: When true, renders PdfHeaderFooter.Format. The running header and footer start hidden; the first-page and even-page variants start shown and render whenever their format is not empty.

Parameters

pdfHeaderFooter OfficeIMO.Pdf.PdfHeaderFooter required
The instance.
value bool = true optional
The value; true when omitted.

Returns

PdfHeaderFooter The same instance.

Examples

// C# initializer or property    // C# fluent
pdfHeaderFooter.Show = value;    pdfHeaderFooter.Show(value);
public static PdfHeaderFooter StandardFont(PdfHeaderFooter pdfHeaderFooter, PdfStandardFont value) #

Sets PdfHeaderFooter.StandardFont: Header or footer standard font.

Parameters

pdfHeaderFooter OfficeIMO.Pdf.PdfHeaderFooter required
The instance.
value OfficeIMO.Pdf.PdfStandardFont required
The value.

Returns

PdfHeaderFooter The same instance.

Examples

// C# initializer or property            // C# fluent
pdfHeaderFooter.StandardFont = value;    pdfHeaderFooter.StandardFont(value);
public static PdfHeaderFooter StyledZones(PdfHeaderFooter pdfHeaderFooter, IEnumerable<PdfFooterSegment>? left, IEnumerable<PdfFooterSegment>? center, IEnumerable<PdfFooterSegment>? right) #

Renders independently styled left, center and right zones on one line.

Parameters

pdfHeaderFooter OfficeIMO.Pdf.PdfHeaderFooter required
The instance.
left System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfFooterSegment>? required
The value.
center System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfFooterSegment>? required
The value.
right System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfFooterSegment>? required
The value.

Returns

PdfHeaderFooter The same instance.
Text 2 overloads
public static PdfHeaderFooter Text(PdfHeaderFooter pdfHeaderFooter, string format) #

Renders format in this slot, replacing segments and zones. Shows the running slot, or turns on the matching PdfPageSetup variant flag for a first-page or even-page slot.

Parameters

pdfHeaderFooter OfficeIMO.Pdf.PdfHeaderFooter required
The instance.
format string required
The value.

Returns

PdfHeaderFooter The same instance.
public static PdfHeaderFooter Text(PdfHeaderFooter pdfHeaderFooter, IEnumerable<PdfFooterSegment> segments) #

Renders styled segments in this slot, replacing its format text and zones.

Parameters

pdfHeaderFooter OfficeIMO.Pdf.PdfHeaderFooter required
The instance.
segments System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfFooterSegment> required
The value.

Returns

PdfHeaderFooter The same instance.
public static PdfHeaderFooter Zones(PdfHeaderFooter pdfHeaderFooter, string? left, string? center, string? right) #

Renders left, center and right text zones on one line. Supports {page} and {pages}.

Parameters

pdfHeaderFooter OfficeIMO.Pdf.PdfHeaderFooter required
The instance.
left string? required
The value.
center string? required
The value.
right string? required
The value.

Returns

PdfHeaderFooter The same instance.