com.jfw.pdf
Class Pdf2Pdf

java.lang.Object
  extended by com.jfw.pdf.PdfCreator
      extended by com.jfw.pdf.Pdf2Pdf

public final class Pdf2Pdf
extends PdfCreator

Create a pdf file using a pdf template.
A pdf template is pdf file with fields that can be valorized.


Constructor Summary
Pdf2Pdf(java.lang.String pdfFile, java.util.HashMap correlationMap)
          Create an instance.
Pdf2Pdf(java.lang.String path, java.lang.String fileName, java.util.HashMap correlationMap)
          Create an instance.
 
Method Summary
 void create()
          Create the pdf.
 java.lang.Object get()
          Get pdf content.
 java.lang.String getPdfFieldNames(java.lang.String separator)
          Get pdf field names.
 java.util.HashMap getPdfFields()
          Return the fields found in pdf template.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pdf2Pdf

public Pdf2Pdf(java.lang.String pdfFile,
               java.util.HashMap correlationMap)
Create an instance.

Parameters:
pdfFile - the name of the pdf file template with absolute path.
correlationMap - the container of pdf templates fields (keys) and values.

Pdf2Pdf

public Pdf2Pdf(java.lang.String path,
               java.lang.String fileName,
               java.util.HashMap correlationMap)
Create an instance.

Parameters:
path - the path of the file.
fileName - the name of the pdf file template.
correlationMap - the container of pdf templates fields (keys) and values.
Method Detail

create

public void create()
            throws java.lang.Exception
Create the pdf.

Specified by:
create in class PdfCreator
Throws:
java.lang.Exception

get

public java.lang.Object get()
                     throws java.lang.Exception
Get pdf content.

Specified by:
get in class PdfCreator
Returns:
the content of the pdf.
Throws:
java.lang.Exception

getPdfFields

public java.util.HashMap getPdfFields()
Return the fields found in pdf template.

Returns:
the fields found in pdf template.

getPdfFieldNames

public java.lang.String getPdfFieldNames(java.lang.String separator)
Get pdf field names.

Parameters:
separator - the separator string to distinguish the fields.
Returns:
pdf fields separeted by separator.