protected class XmlToPdf.PdfHeaderFooter
extends com.itextpdf.text.pdf.PdfPageEventHelper
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected int |
__covernum
The page number shown in a cover page footer.
|
protected boolean |
__coverpage
A flag indicating that a cover page is being processed.
|
protected java.lang.String |
__datetime
The date and time shown in the footer.
|
protected org.w3c.dom.Element |
__docroot
The XML document's root node (report tag).
|
protected boolean |
__footer
The show footer flag.
|
protected boolean |
__header
The show header flag.
|
protected int |
__numpages
The total number of pages shown in the footer.
|
protected int |
__pagenum
The page number shown in the footer.
|
protected int |
__tablenum
The page number shown in a table of contents footer.
|
protected boolean |
__tablepage
A flag indicating that a table of contents page is being processed.
|
protected java.lang.String |
__title
The title shown in the header.
|
private static long |
serialVersionUID
The class' serialization version id.
|
Modifier | Constructor and Description |
---|---|
protected |
PdfHeaderFooter(org.w3c.dom.Element docroot,
int numpages)
Creates a new PDF header-footer instance.
|
Modifier and Type | Method and Description |
---|---|
int[] |
getPageNumbers()
Returns an array that contains the current page numbers for cover page(s),
main content page(s) and table of contents page(s).
|
void |
onChapter(com.itextpdf.text.pdf.PdfWriter writer,
com.itextpdf.text.Document document,
float position,
com.itextpdf.text.Paragraph title)
Called when a chapter is written.
|
void |
onEndPage(com.itextpdf.text.pdf.PdfWriter writer,
com.itextpdf.text.Document document)
Called when a page is finished, just before being written to the document.
|
void |
onSection(com.itextpdf.text.pdf.PdfWriter writer,
com.itextpdf.text.Document document,
float position,
int depth,
com.itextpdf.text.Paragraph title)
Called when a section is written.
|
private static final long serialVersionUID
protected org.w3c.dom.Element __docroot
protected boolean __header
protected boolean __footer
protected java.lang.String __title
protected int __pagenum
protected int __numpages
protected java.lang.String __datetime
protected boolean __coverpage
protected int __covernum
protected boolean __tablepage
protected int __tablenum
protected PdfHeaderFooter(org.w3c.dom.Element docroot, int numpages)
docroot
- (Element) The XML document's root node.numpages
- (int) The total number of pages shown in the footer.public int[] getPageNumbers()
public void onEndPage(com.itextpdf.text.pdf.PdfWriter writer, com.itextpdf.text.Document document)
onEndPage
in interface com.itextpdf.text.pdf.PdfPageEvent
onEndPage
in class com.itextpdf.text.pdf.PdfPageEventHelper
writer
- (PdfWriter) The writer for the document being created.document
- (Document) The document being created.public void onChapter(com.itextpdf.text.pdf.PdfWriter writer, com.itextpdf.text.Document document, float position, com.itextpdf.text.Paragraph title)
onChapter
in interface com.itextpdf.text.pdf.PdfPageEvent
onChapter
in class com.itextpdf.text.pdf.PdfPageEventHelper
writer
- (PdfWriter) The writer for the document being created.document
- (Document) The document being created.position
- (float) The position the chapter will be written to.title
- (Paragraph) The title of the chapter.public void onSection(com.itextpdf.text.pdf.PdfWriter writer, com.itextpdf.text.Document document, float position, int depth, com.itextpdf.text.Paragraph title)
onSection
in interface com.itextpdf.text.pdf.PdfPageEvent
onSection
in class com.itextpdf.text.pdf.PdfPageEventHelper
writer
- (PdfWriter) The writer for the document being created.document
- (Document) The document being created.position
- (float) The position the section will be written to.depth
- (int) The number depth of the section.title
- (Paragraph) The title of the section.