Table of Contents

Interface IDocListener

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

A class that implements DocListener will perform some actions when some actions are performed on a Document.

public interface IDocListener : IElementListener, IDisposable
Inherited Members

Properties

methods

HeaderFooter Footer { set; }

Property Value

HeaderFooter

a Footer

Header

Changes the header of this document.

HeaderFooter Header { set; }

Property Value

HeaderFooter

a Header

PageCount

Sets the page number.

int PageCount { set; }

Property Value

int

the new page number

Methods

Close()

Signals that the Document was closed and that no other Elements will be added.

void Close()

Remarks

The output stream of every writer implementing IDocListener will be closed.

NewPage()

Signals that an new page has to be started.

bool NewPage()

Returns

bool

true if the page was added, false if not.

Open()

Signals that the Document has been opened and that Elements can be added.

void Open()

ResetFooter()

Resets the footer of this document.

void ResetFooter()

ResetHeader()

Resets the header of this document.

void ResetHeader()

ResetPageCount()

Sets the page number to 0.

void ResetPageCount()

SetMarginMirroring(bool)

Parameter that allows you to do margin mirroring (odd/even pages)

bool SetMarginMirroring(bool marginMirroring)

Parameters

marginMirroring bool

Returns

bool

true if succesfull

SetMarginMirroringTopBottom(bool)

Parameter that allows you to do top/bottom margin mirroring (odd/even pages) @since 2.1.6

bool SetMarginMirroringTopBottom(bool marginMirroringTopBottom)

Parameters

marginMirroringTopBottom bool

Returns

bool

true if successful

SetMargins(float, float, float, float)

Sets the margins.

bool SetMargins(float marginLeft, float marginRight, float marginTop, float marginBottom)

Parameters

marginLeft float

the margin on the left

marginRight float

the margin on the right

marginTop float

the margin on the top

marginBottom float

the margin on the bottom

Returns

bool

SetPageSize(Rectangle)

Sets the pagesize.

bool SetPageSize(Rectangle pageSize)

Parameters

pageSize Rectangle

the new pagesize

Returns

bool

a boolean