platypus.pdf
Class PageFooter

java.lang.Object
  extended by com.lowagie.text.pdf.PdfPageEventHelper
      extended by platypus.pdf.PageFooter
All Implemented Interfaces:
com.lowagie.text.pdf.PdfPageEvent

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

Places the page number as a footer on the bottom of each page (to the right) Once it's working, it will be converted into a command.

Author:
alb

Field Summary
private  PlatyFont footerFont
           
private  Value<java.lang.Integer> pagesToSkip
           
 
Constructor Summary
PageFooter()
          Set the font, font size, and the number of pages to skip before the footer is first printed.
 
Method Summary
 int getPagesToSkip()
           
 int getPagesToSkipLineSet()
          Get the line # where the pages to skip was set.
 PlatyFont getPlatyFont()
           
 void onEndPage(com.lowagie.text.pdf.PdfWriter writer, com.lowagie.text.Document document)
          Print the footer consisting of em-dash + page number + em-dash if we have skipped a sufficient number of pages without a footer.
 void setPagesToSkip(int pagesPriorToFooter)
          Set the number of pages to skip before the footer is first printed.
 void setPlatyFont(PlatyFont f)
           
 
Methods inherited from class com.lowagie.text.pdf.PdfPageEventHelper
onChapter, onChapterEnd, onCloseDocument, onGenericTag, onOpenDocument, 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

footerFont

private PlatyFont footerFont

pagesToSkip

private Value<java.lang.Integer> pagesToSkip
Constructor Detail

PageFooter

public PageFooter()
Set the font, font size, and the number of pages to skip before the footer is first printed.

Method Detail

setPagesToSkip

public void setPagesToSkip(int pagesPriorToFooter)
Set the number of pages to skip before the footer is first printed. Typically, this is set to 1, so that the first page of a document has no page number. In a single-page doc, this is standard. In a multipage doc, the first page is often a cover sheet, so a page number is not needed or wanted.

Parameters:
pagesPriorToFooter - pages to skip

getPagesToSkip

public int getPagesToSkip()

getPagesToSkipLineSet

public int getPagesToSkipLineSet()
Get the line # where the pages to skip was set.

Returns:
line number

setPlatyFont

public void setPlatyFont(PlatyFont f)

getPlatyFont

public PlatyFont getPlatyFont()

onEndPage

public void onEndPage(com.lowagie.text.pdf.PdfWriter writer,
                      com.lowagie.text.Document document)
Print the footer consisting of em-dash + page number + em-dash if we have skipped a sufficient number of pages without a footer.

Specified by:
onEndPage in interface com.lowagie.text.pdf.PdfPageEvent
Overrides:
onEndPage in class com.lowagie.text.pdf.PdfPageEventHelper
Parameters:
writer - used for writing the footer
document - the document in which the footer will be written


Copyright © 2006-7 Pacific Data Works LLC