Skip to main content
Skip table of contents

IDocListener

IDocListener Public interface

Description

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

Diagram

  flowchart LR
  classDef interfaceStyle stroke-dasharray: 5 5;
  classDef abstractStyle stroke-width:4px
  subgraph iTextSharp.text
  iTextSharp.text.IDocListener[[IDocListener]]
  class iTextSharp.text.IDocListener interfaceStyle;
  iTextSharp.text.IElementListener[[IElementListener]]
  class iTextSharp.text.IElementListener interfaceStyle;
  end
  subgraph System
System.IDisposable[[IDisposable]]
  end
iTextSharp.text.IElementListener --> iTextSharp.text.IDocListener
System.IDisposable --> iTextSharp.text.IDocListener

Members

Properties

Public properties
TypeNameMethods
intPageCount
Sets the page number.
set

Methods

Public methods
ReturnsName
voidClose()
Signals that the Document was closed and that no other
Elements will be added.
boolNewPage()
Signals that an new page has to be started.
voidOpen()
Signals that the Document has been opened and that
Elements can be added.
voidResetPageCount()
Sets the page number to 0.
boolSetMarginMirroring(bool marginMirroring)
boolSetMarginMirroringTopBottom(bool marginMirroringTopBottom)
boolSetMargins(float marginLeft, float marginRight, float marginTop, float marginBottom)
Sets the margins.
boolSetPageSize(Rectangle pageSize)
Sets the pagesize.

Details

Summary

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

Inheritance

Methods

Open
public void Open()
Summary

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

Close
public void Close()
Summary

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

Remarks

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

NewPage
public bool NewPage()
Summary

Signals that an new page has to be started.

Returns

true if the page was added, false if not.

SetPageSize
public bool SetPageSize(Rectangle pageSize)
Arguments
TypeNameDescription
RectanglepageSizethe new pagesize
Summary

Sets the pagesize.

Returns

a boolean

SetMargins
public bool SetMargins(float marginLeft, float marginRight, float marginTop, float marginBottom)
Arguments
TypeNameDescription
floatmarginLeftthe margin on the left
floatmarginRightthe margin on the right
floatmarginTopthe margin on the top
floatmarginBottomthe margin on the bottom
Summary

Sets the margins.

Returns
SetMarginMirroring
public bool SetMarginMirroring(bool marginMirroring)
Arguments
TypeNameDescription
boolmarginMirroring
SetMarginMirroringTopBottom
public bool SetMarginMirroringTopBottom(bool marginMirroringTopBottom)
Arguments
TypeNameDescription
boolmarginMirroringTopBottom
ResetPageCount
public void ResetPageCount()
Summary

Sets the page number to 0.

Properties

PageCount
public int PageCount { set; }
Summary

Sets the page number.

Value

the new page number

Generated with ModularDoc

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.