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
PageNumber
The current page number, as a field the reader evaluates.
public static DocxHeaderSegment PageNumber { get; }
Property Value
Methods
Text(string)
Literal text.
public static DocxHeaderSegment Text(string text)
Parameters
textstringThe text. May be empty; may not be null.
Returns
Exceptions
- ArgumentNullException
textis null.