Table of Contents

Class RtfHeaderFooter

Namespace
iTextSharp.text.rtf.headerfooter
Assembly
iTextSharp.LGPLv2.Core.dll

The RtfHeaderFooter represents one header or footer. This class can be used directly. @author Mark Hall (Mark.Hall@mail.room3b.eu)

public class RtfHeaderFooter : HeaderFooter, IElement, IRtfBasicElement, IRtfElementInterface
Inheritance
RtfHeaderFooter
Implements
Inherited Members

Constructors

RtfHeaderFooter(IElement)

Constructs a RtfHeaderFooter for any Element.

public RtfHeaderFooter(IElement element)

Parameters

element IElement

The Element to display as content of this RtfHeaderFooter

RtfHeaderFooter(IElement[])

Constructs a RtfHeaderFooter for an array of Elements.

public RtfHeaderFooter(IElement[] elements)

Parameters

elements IElement[]

The Elements to display as the content of this RtfHeaderFooter.

RtfHeaderFooter(RtfDocument, HeaderFooter)

Constructs a RtfHeaderFooter for a HeaderFooter.

protected RtfHeaderFooter(RtfDocument doc, HeaderFooter headerFooter)

Parameters

doc RtfDocument

The RtfDocument this RtfHeaderFooter belongs to

headerFooter HeaderFooter

The HeaderFooter to base this RtfHeaderFooter on

RtfHeaderFooter(RtfDocument, HeaderFooter, int, int)

Constructs a RtfHeaderFooter based on a HeaderFooter with a certain type and displayAt location. For internal use only.

protected RtfHeaderFooter(RtfDocument doc, HeaderFooter headerFooter, int type, int displayAt)

Parameters

doc RtfDocument

The RtfDocument this RtfHeaderFooter belongs to

headerFooter HeaderFooter

The HeaderFooter to base this RtfHeaderFooter on

type int

The type of RtfHeaderFooter

displayAt int

The display location of this RtfHeaderFooter

RtfHeaderFooter(RtfDocument, RtfHeaderFooter, int)

Constructs a RtfHeaderFooter as a copy of an existing RtfHeaderFooter. For internal use only.

protected RtfHeaderFooter(RtfDocument doc, RtfHeaderFooter headerFooter, int displayAt)

Parameters

doc RtfDocument

The RtfDocument this RtfHeaderFooter belongs to

headerFooter RtfHeaderFooter

The RtfHeaderFooter to copy

displayAt int

The display location of this RtfHeaderFooter

Fields

DISPLAY_ALL_PAGES

Constant for displaying the header/footer on all pages

public const int DISPLAY_ALL_PAGES = 1

Field Value

int

DISPLAY_FIRST_PAGE

Constant for displaying the header/footer on the first page

public const int DISPLAY_FIRST_PAGE = 0

Field Value

int

DISPLAY_LEFT_PAGES

Constant for displaying the header/footer on all left hand pages

public const int DISPLAY_LEFT_PAGES = 2

Field Value

int

DISPLAY_RIGHT_PAGES

Constant for displaying the header/footer on all right hand pages

public const int DISPLAY_RIGHT_PAGES = 4

Field Value

int

Constant for the footer type

public const int TYPE_FOOTER = 2

Field Value

int

TYPE_HEADER

Constant for the header type

public const int TYPE_HEADER = 1

Field Value

int

Methods

SetAlignment(int)

Set the alignment of this RtfHeaderFooter. Passes the setting on to the contained element.

public void SetAlignment(int alignment)

Parameters

alignment int

SetDisplayAt(int)

Sets the display location of this RtfHeaderFooter

public void SetDisplayAt(int displayAt)

Parameters

displayAt int

The display location to use.

SetInHeader(bool)

Unused

public void SetInHeader(bool inHeader)

Parameters

inHeader bool

SetInTable(bool)

Unused

public void SetInTable(bool inTable)

Parameters

inTable bool

SetRtfDocument(RtfDocument)

Sets the RtfDocument this RtfElement belongs to

public void SetRtfDocument(RtfDocument doc)

Parameters

doc RtfDocument

The RtfDocument to use

SetType(int)

Sets the type of this RtfHeaderFooter

public void SetType(int type)

Parameters

type int

The type to use.

WriteContent(Stream)

Write the content of this RtfHeaderFooter.

public virtual void WriteContent(Stream outp)

Parameters

outp Stream