net.sf.jzeno.reporting.pdf
Class PdfPageNumbering

java.lang.Object
  extended by com.lowagie.text.pdf.PdfPageEventHelper
      extended by net.sf.jzeno.reporting.pdf.PdfPageNumbering
All Implemented Interfaces:
com.lowagie.text.pdf.PdfPageEvent

public class PdfPageNumbering
extends com.lowagie.text.pdf.PdfPageEventHelper

Event Listener for PdfPageEvents. Adds page numbering ( Page x of y ) at the bottom of each page.


Field Summary
protected  com.lowagie.text.pdf.PdfTemplate totalTemplate
           
 
Constructor Summary
PdfPageNumbering()
          Creates a default numbering with font Helvetica, size 8 and style Italic
PdfPageNumbering(com.lowagie.text.Font font)
           
 
Method Summary
 com.lowagie.text.Font getFont()
           
 void onCloseDocument(com.lowagie.text.pdf.PdfWriter writer, com.lowagie.text.Document document)
          Adds the total (y in "Page x of y") to every page.
 void onEndPage(com.lowagie.text.pdf.PdfWriter writer, com.lowagie.text.Document document)
          Adds "Page x of " to the bottom of the current page
 void onOpenDocument(com.lowagie.text.pdf.PdfWriter writer, com.lowagie.text.Document document)
          Initialization routines
 void setFont(com.lowagie.text.Font font)
           
 
Methods inherited from class com.lowagie.text.pdf.PdfPageEventHelper
onChapter, onChapterEnd, onGenericTag, onParagraph, onParagraphEnd, onSection, onSectionEnd, onStartPage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

totalTemplate

protected com.lowagie.text.pdf.PdfTemplate totalTemplate
Constructor Detail

PdfPageNumbering

public PdfPageNumbering()
Creates a default numbering with font Helvetica, size 8 and style Italic


PdfPageNumbering

public PdfPageNumbering(com.lowagie.text.Font font)
Method Detail

onOpenDocument

public void onOpenDocument(com.lowagie.text.pdf.PdfWriter writer,
                           com.lowagie.text.Document document)
Initialization routines

Specified by:
onOpenDocument in interface com.lowagie.text.pdf.PdfPageEvent
Overrides:
onOpenDocument in class com.lowagie.text.pdf.PdfPageEventHelper

onEndPage

public void onEndPage(com.lowagie.text.pdf.PdfWriter writer,
                      com.lowagie.text.Document document)
Adds "Page x of " to the bottom of the current page

Specified by:
onEndPage in interface com.lowagie.text.pdf.PdfPageEvent
Overrides:
onEndPage in class com.lowagie.text.pdf.PdfPageEventHelper

onCloseDocument

public void onCloseDocument(com.lowagie.text.pdf.PdfWriter writer,
                            com.lowagie.text.Document document)
Adds the total (y in "Page x of y") to every page.

Specified by:
onCloseDocument in interface com.lowagie.text.pdf.PdfPageEvent
Overrides:
onCloseDocument in class com.lowagie.text.pdf.PdfPageEventHelper

getFont

public com.lowagie.text.Font getFont()

setFont

public void setFont(com.lowagie.text.Font font)