org.kuali.kfs.module.purap.pdf
Class PurapPdf

java.lang.Object
  extended by com.lowagie.text.pdf.PdfPageEventHelper
      extended by org.kuali.kfs.module.purap.pdf.PurapPdf
All Implemented Interfaces:
com.lowagie.text.pdf.PdfPageEvent
Direct Known Subclasses:
BulkReceivingPdf, PurchaseOrderPdf, PurchaseOrderQuotePdf

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

Base class to be extended for implementing PDF documents in Purchasing/Accounts Payable module.


Field Summary
 String campusName
           
 com.lowagie.text.pdf.PdfContentByte cb
           
 String environment
           
 com.lowagie.text.pdf.PdfPTable headerTable
           
 com.lowagie.text.pdf.BaseFont helv
           
 boolean isPreview
           
 boolean isRetransmit
           
 com.lowagie.text.Image logo
           
 String logoImage
           
 com.lowagie.text.pdf.PdfPTable nestedHeaderTable
           
 PurchaseOrderDocument po
           
 com.lowagie.text.pdf.PdfTemplate tpl
          headerTable pieces need to be public
 
Constructor Summary
PurapPdf()
           
 
Method Summary
 void deletePdf(String pdfFileLocation, String pdfFilename)
          Deletes an already created PDF.
 org.kuali.rice.kns.service.DateTimeService getDateTimeService()
           
 com.lowagie.text.Document getDocument(float f1, float f2, float f3, float f4)
          Creates an instance of a new Document and set its margins according to the given input parameters.
 PurapPdf getPageEvents()
          Gets a PageEvents object.
 void onCloseDocument(com.lowagie.text.pdf.PdfWriter writer, com.lowagie.text.Document document)
          Overrides the method in the PdfPageEventHelper from itext to put the total number of pages into the template.
 void onEndPage(com.lowagie.text.pdf.PdfWriter writer, com.lowagie.text.Document document)
          Overrides the method in PdfPageEventHelper from itext to write the headerTable, compose the footer and show the footer.
 void onStartPage(com.lowagie.text.pdf.PdfWriter writer, com.lowagie.text.Document document)
          Overrides the method in PdfPageEventHelper from itext to include our watermark text to indicate that this is a Test document and include the environment, if the environment is not a production environment.
 
Methods inherited from class com.lowagie.text.pdf.PdfPageEventHelper
onChapter, onChapterEnd, onGenericTag, onOpenDocument, onParagraph, onParagraphEnd, onSection, onSectionEnd
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tpl

public com.lowagie.text.pdf.PdfTemplate tpl
headerTable pieces need to be public


cb

public com.lowagie.text.pdf.PdfContentByte cb

logo

public com.lowagie.text.Image logo

headerTable

public com.lowagie.text.pdf.PdfPTable headerTable

nestedHeaderTable

public com.lowagie.text.pdf.PdfPTable nestedHeaderTable

campusName

public String campusName

po

public PurchaseOrderDocument po

logoImage

public String logoImage

helv

public com.lowagie.text.pdf.BaseFont helv

environment

public String environment

isPreview

public boolean isPreview

isRetransmit

public boolean isRetransmit
Constructor Detail

PurapPdf

public PurapPdf()
Method Detail

getDateTimeService

public org.kuali.rice.kns.service.DateTimeService getDateTimeService()

onStartPage

public void onStartPage(com.lowagie.text.pdf.PdfWriter writer,
                        com.lowagie.text.Document document)
Overrides the method in PdfPageEventHelper from itext to include our watermark text to indicate that this is a Test document and include the environment, if the environment is not a production environment.

Specified by:
onStartPage in interface com.lowagie.text.pdf.PdfPageEvent
Overrides:
onStartPage in class com.lowagie.text.pdf.PdfPageEventHelper
Parameters:
writer - The PdfWriter for this document.
document - The document.
See Also:
PdfPageEventHelper.onStartPage(com.lowagie.text.pdf.PdfWriter, com.lowagie.text.Document)

onEndPage

public void onEndPage(com.lowagie.text.pdf.PdfWriter writer,
                      com.lowagie.text.Document document)
Overrides the method in PdfPageEventHelper from itext to write the headerTable, compose the footer and show the footer.

Specified by:
onEndPage in interface com.lowagie.text.pdf.PdfPageEvent
Overrides:
onEndPage in class com.lowagie.text.pdf.PdfPageEventHelper
Parameters:
writer - The PdfWriter for this document.
document - The document.
See Also:
PdfPageEventHelper.onEndPage(com.lowagie.text.pdf.PdfWriter, com.lowagie.text.Document)

onCloseDocument

public void onCloseDocument(com.lowagie.text.pdf.PdfWriter writer,
                            com.lowagie.text.Document document)
Overrides the method in the PdfPageEventHelper from itext to put the total number of pages into the template.

Specified by:
onCloseDocument in interface com.lowagie.text.pdf.PdfPageEvent
Overrides:
onCloseDocument in class com.lowagie.text.pdf.PdfPageEventHelper
Parameters:
writer - The PdfWriter for this document.
document - The document.
See Also:
PdfPageEventHelper.onCloseDocument(com.lowagie.text.pdf.PdfWriter, com.lowagie.text.Document)

getPageEvents

public PurapPdf getPageEvents()
Gets a PageEvents object.

Returns:
a new PageEvents object

getDocument

public com.lowagie.text.Document getDocument(float f1,
                                             float f2,
                                             float f3,
                                             float f4)
Creates an instance of a new Document and set its margins according to the given input parameters.

Parameters:
f1 - Left margin.
f2 - Right margin.
f3 - Top margin.
f4 - Bottom margin.
Returns:
The created Document object.

deletePdf

public void deletePdf(String pdfFileLocation,
                      String pdfFilename)
Deletes an already created PDF.

Parameters:
pdfFileLocation - The location of the pdf file.
pdfFilename - The name of the pdf file.


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.