Gnostice PDFOne
Pro. Ed. v5.0.0


com.gnostice.pdfone
Class PdfSignature

java.lang.Object
  extended bycom.gnostice.pdfone.PdfSignature

public class PdfSignature
extends Object

This class represents a digital signature that can be added to a PDF document. A digital signature is placed in a PDF document as a special form field - signature form field. Digital signature can also be added without an appearance on the document - in the form form of a hidden signature.


Constructor Summary
PdfSignature(String PFXFileName, String PFXPassword, String reason, String location, String contactInfo, int pageNum)
          Constructs a signature form field using specified digital certificate from specified PFX file.
 
Method Summary
 boolean isInvisible()
          Returns whether the signature is invisible.
 void setBackgroundcolor(Color backgroundcolor)
          Sets specified background color for the signature.
 void setContactInfo(String contactInfo)
          Sets specified text as the "contact information" of the owner of the digital signature.
 void setFieldAppearanceStream(PdfAppearanceStream fieldAppearanceStream)
          Sets specified custom appearance stream for the digital signature.
 void setFieldName(String fieldName)
          Sets specified name for the signature form field.
 void setFieldRect(PdfRect fieldRect)
          Sets specified location for the signature.
 void setFont(PdfFont font)
          Sets specified font as the default font for the signature form field.
 void setLocation(String location)
          Sets specified text as the "location" where the digital signature was added to the document.
 void setPageNum(int pageNum)
          Sets number of the page where the signature needs to be added.
 void setPFXFileName(String pFXFileName)
          Loads the digital certificate from specified PFX file.
 void setPFXPassword(String pFXPassword)
          Sets the password with which the digital certificate needs to be read from the specified PFX file.
 void setReason(String reason)
          Sets specified text as "reason" for adding the digital signature.
 void setTimeStamp(Date timeStamp)
          Sets specified date as time stamp when the digital signature was added.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdfSignature

public PdfSignature(String PFXFileName,
                    String PFXPassword,
                    String reason,
                    String location,
                    String contactInfo,
                    int pageNum)
             throws PdfException
Constructs a signature form field using specified digital certificate from specified PFX file.

Parameters:
PFXFileName - PFX file from which the digital certificate needs to be loaded
PFXPassword - password with which the certificate needs to be read
reason - text that needs to be assigned as the "reason" for the signature
location - text that needs to be assigned as the "location" for the signature
contactInfo - text that needs to be assigned as the "contact information" for the signature
pageNum - number of the page where the signature needs to be added
Throws:
PdfException - if an illegal argument is supplied.
Method Detail

setPFXFileName

public void setPFXFileName(String pFXFileName)
Loads the digital certificate from specified PFX file.

Parameters:
pFXFileName - pathname of the PFX file containing the digital certificate

setPFXPassword

public void setPFXPassword(String pFXPassword)
Sets the password with which the digital certificate needs to be read from the specified PFX file.

Parameters:
pFXPassword - password for reading the digital certificate

setReason

public void setReason(String reason)
Sets specified text as "reason" for adding the digital signature. For example, you can specify it as "I agree."

Parameters:
reason - text that needs to be set as the reason for adding the signature

setLocation

public void setLocation(String location)
Sets specified text as the "location" where the digital signature was added to the document. For example, you can use the CPU host name or the physical address where the signature was added.

Parameters:
location - text that needs to be identified as the location where the signature was added

setContactInfo

public void setContactInfo(String contactInfo)
Sets specified text as the "contact information" of the owner of the digital signature. This information can be useful for the recipient of the document to contact the owner of the signature.

Parameters:
contactInfo - text that needs to be set as the "contact information" property of the digital signature

setTimeStamp

public void setTimeStamp(Date timeStamp)
Sets specified date as time stamp when the digital signature was added. If not specified, this detail will not be available in the signature.

Parameters:
timeStamp - time stamp that needs to be set for the signature

setFieldName

public void setFieldName(String fieldName)
Sets specified name for the signature form field.

Parameters:
fieldName - name for the signature form field

setFieldRect

public void setFieldRect(PdfRect fieldRect)
Sets specified location for the signature.

Parameters:
fieldRect - location of the signature on a page

setBackgroundcolor

public void setBackgroundcolor(Color backgroundcolor)
Sets specified background color for the signature.

Parameters:
backgroundcolor - background color for the signature

setFont

public void setFont(PdfFont font)
Sets specified font as the default font for the signature form field.

Parameters:
font - default font for the signature form field

setPageNum

public void setPageNum(int pageNum)
Sets number of the page where the signature needs to be added.

Parameters:
pageNum - number of the page where the signature needs to be added

setFieldAppearanceStream

public void setFieldAppearanceStream(PdfAppearanceStream fieldAppearanceStream)
Sets specified custom appearance stream for the digital signature.

Parameters:
fieldAppearanceStream - custom appearance stream that needs to be set for the digital signature

isInvisible

public boolean isInvisible()
Returns whether the signature is invisible.

Returns:
true if invisible; false if otherwise

Gnostice PDFOne
Pro. Ed. v5.0.0

To contact our support team, send an e-mail to support@gnostice.com.
 
© 2010 Gnostice Information Technologies Private Limited. All rights reserved.
www.gnostice.com