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

java.lang.Object
  extended by com.lowagie.text.pdf.PdfPageEventHelper
      extended by org.kuali.kfs.module.purap.pdf.PurchaseOrderQuoteRequestsPdf
All Implemented Interfaces:
com.lowagie.text.pdf.PdfPageEvent

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

Base class to handle pdf for purchase order quote request documents.


Field Summary
 com.lowagie.text.pdf.PdfContentByte cb
           
 com.lowagie.text.pdf.PdfPTable headerTable
           
 com.lowagie.text.pdf.BaseFont helv
           
 PurchaseOrderDocument po
           
 com.lowagie.text.pdf.PdfTemplate tpl
           
 
Constructor Summary
PurchaseOrderQuoteRequestsPdf()
           
 
Method Summary
 void deletePdf(String pdfFileLocation, String pdfFilename)
          Deletes an already created PDF.
 Collection generatePOQuoteRequestsListPdf(PurchaseOrderDocument po, ByteArrayOutputStream byteArrayOutputStream, String institutionName)
          Generates the purchase order quote request list pdf document based on the data in the given input parameters by creating a pdf writer using the given byteArrayOutputStream then calls the createPOQuoteRequestsListPdf to write the pdf document into the writer.
 PurchaseOrderPdf 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 compose the footer and show the footer.
 void onOpenDocument(com.lowagie.text.pdf.PdfWriter writer, com.lowagie.text.Document document)
          Overrides the method in PdfPageEventHelper from itext to initialize the template and font for purchase order quote request pdf documents.
 Collection savePOQuoteRequestsListPdf(PurchaseOrderDocument po, String pdfFileLocation, String pdfFilename, String institutionName)
          Invokes the createPOQuoteRequestsListPdf method to create a purchase order quote list request pdf document and saves it into a file which name and location are specified in the input parameters.
 
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

tpl

public com.lowagie.text.pdf.PdfTemplate tpl

cb

public com.lowagie.text.pdf.PdfContentByte cb

headerTable

public com.lowagie.text.pdf.PdfPTable headerTable

po

public PurchaseOrderDocument po

helv

public com.lowagie.text.pdf.BaseFont helv
Constructor Detail

PurchaseOrderQuoteRequestsPdf

public PurchaseOrderQuoteRequestsPdf()
Method Detail

onOpenDocument

public void onOpenDocument(com.lowagie.text.pdf.PdfWriter writer,
                           com.lowagie.text.Document document)
Overrides the method in PdfPageEventHelper from itext to initialize the template and font for purchase order quote request pdf documents.

Specified by:
onOpenDocument in interface com.lowagie.text.pdf.PdfPageEvent
Overrides:
onOpenDocument in class com.lowagie.text.pdf.PdfPageEventHelper
Parameters:
writer - The PdfWriter for this document.
document - The document.
See Also:
PdfPageEventHelper.onOpenDocument(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 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 PurchaseOrderPdf getPageEvents()
Gets a PageEvents object.

Returns:
a new PageEvents object

generatePOQuoteRequestsListPdf

public Collection generatePOQuoteRequestsListPdf(PurchaseOrderDocument po,
                                                 ByteArrayOutputStream byteArrayOutputStream,
                                                 String institutionName)
Generates the purchase order quote request list pdf document based on the data in the given input parameters by creating a pdf writer using the given byteArrayOutputStream then calls the createPOQuoteRequestsListPdf to write the pdf document into the writer.

Parameters:
po - The PurchaseOrderDocument to be used to generate the pdf.
byteArrayOutputStream - The ByteArrayOutputStream to print the pdf to.
institutionName - The purchasing institution name.
Returns:
Collection of errors which are made of the messages from DocumentException.

savePOQuoteRequestsListPdf

public Collection savePOQuoteRequestsListPdf(PurchaseOrderDocument po,
                                             String pdfFileLocation,
                                             String pdfFilename,
                                             String institutionName)
Invokes the createPOQuoteRequestsListPdf method to create a purchase order quote list request pdf document and saves it into a file which name and location are specified in the input parameters.

Parameters:
po - The PurchaseOrderDocument to be used to generate the pdf.
pdfFileLocation - The location to save the pdf file.
pdfFilename - The name for the pdf file.
institutionName - The purchasing institution name.
Returns:
Collection of errors which are made of the messages from DocumentException.

deletePdf

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

Parameters:
pdfFileLocation - The location to save the pdf file.
pdfFilename - The name for the pdf file.


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