Table of Contents

Class DocxHeaderSegment

Namespace
DocToolkit
Assembly
DocToolkit.Primitives.dll

One piece of a header or footer line: literal text, or a field the reader evaluates per page.

public abstract class DocxHeaderSegment
Inheritance
DocxHeaderSegment
Inherited Members

Remarks

A page number cannot be a string. Written as text it is fixed at the moment the document is generated, so it is correct on exactly one page and wrong on all the others — which is worse than having no page number at all, because it looks right.

Properties

PageCount

The total page count, as a field the reader evaluates.

public static DocxHeaderSegment PageCount { get; }

Property Value

DocxHeaderSegment

PageNumber

The current page number, as a field the reader evaluates.

public static DocxHeaderSegment PageNumber { get; }

Property Value

DocxHeaderSegment

Methods

Text(string)

Literal text.

public static DocxHeaderSegment Text(string text)

Parameters

text string

The text. May be empty; may not be null.

Returns

DocxHeaderSegment

Exceptions

ArgumentNullException

text is null.