com.lowagie.text
Interface DocListener
- ElementListener, EventListener
- Document, DocWriter, FdfWriter.Wrt, HtmlWriter, HTMLWorker, PdfCopy, PdfCopyFieldsImp, PdfDocument, PdfSmartCopy, PdfStamperImp, PdfWriter, RtfWriter, RtfWriter2
public interface DocListener
A class that implements DocListener
will perform some
actions when some actions are performed on a Document
.
void | close() - Signals that the
Document was closed and that no other
Elements will be added.
|
boolean | newPage() - Signals that an new page has to be started.
|
void | open() - Signals that the
Document has been opened and that
Elements can be added.
|
void | resetFooter() - Resets the footer of this document.
|
void | resetHeader() - Resets the header of this document.
|
void | resetPageCount() - Sets the page number to 0.
|
void | setFooter(HeaderFooter footer) - Changes the footer of this document.
|
void | setHeader(HeaderFooter header) - Changes the header of this document.
|
boolean | setMarginMirroring(boolean marginMirroring) - Parameter that allows you to do margin mirroring (odd/even pages)
|
boolean | setMargins(float marginLeft, float marginRight, float marginTop, float marginBottom) - Sets the margins.
|
void | setPageCount(int pageN) - Sets the page number.
|
boolean | setPageSize(Rectangle pageSize) - Sets the pagesize.
|
close
public void close()
Signals that the
Document
was closed and that no other
Elements
will be added.
The outputstream of every writer implementing
DocListener
will be closed.
newPage
public boolean newPage()
Signals that an new page has to be started.
true
if the page was added, false
if not.
open
public void open()
Signals that the Document
has been opened and that
Elements
can be added.
resetFooter
public void resetFooter()
Resets the footer of this document.
resetHeader
public void resetHeader()
Resets the header of this document.
resetPageCount
public void resetPageCount()
Sets the page number to 0.
setFooter
public void setFooter(HeaderFooter footer)
Changes the footer of this document.
setHeader
public void setHeader(HeaderFooter header)
Changes the header of this document.
setMarginMirroring
public boolean setMarginMirroring(boolean marginMirroring)
Parameter that allows you to do margin mirroring (odd/even pages)
setMargins
public boolean setMargins(float marginLeft,
float marginRight,
float marginTop,
float marginBottom)
Sets the margins.
marginLeft
- the margin on the leftmarginRight
- the margin on the rightmarginTop
- the margin on the topmarginBottom
- the margin on the bottom
setPageCount
public void setPageCount(int pageN)
Sets the page number.
pageN
- the new page number
setPageSize
public boolean setPageSize(Rectangle pageSize)
Sets the pagesize.
pageSize
- the new pagesize