Package com.itextpdf.signatures
Class SignerProperties
- java.lang.Object
-
- com.itextpdf.signatures.SignerProperties
-
public class SignerProperties extends java.lang.Object
Properties to be used in signing operations.
-
-
Field Summary
Fields Modifier and Type Field Description private SignatureFieldAppearance
appearance
private int
certificationLevel
private java.lang.String
contact
private PdfSigFieldLock
fieldLock
private java.lang.String
fieldName
private java.lang.String
location
private int
pageNumber
private Rectangle
pageRect
private java.lang.String
reason
private java.lang.String
signatureCreator
private java.util.Calendar
signDate
-
Constructor Summary
Constructors Constructor Description SignerProperties()
Create instance ofSignerProperties
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCertificationLevel()
Returns the document's certification level.java.lang.String
getContact()
Returns the signing contact.PdfSigFieldLock
getFieldLockDict()
Getter for the field lock dictionary.java.lang.String
getFieldName()
Gets the field name.java.lang.String
getLocation()
Returns the signing location.int
getPageNumber()
Provides the page number of the signature field which this signature appearance is associated with.Rectangle
getPageRect()
Provides the rectangle that represent the position and dimension of the signature field in the page.java.lang.String
getReason()
Returns the signing reason.SignatureFieldAppearance
getSignatureAppearance()
Gets signature field layout element, which customizes the appearance of a signature.java.lang.String
getSignatureCreator()
Returns the signature creator.java.util.Calendar
getSignDate()
Gets the signature date.SignerProperties
setCertificationLevel(int certificationLevel)
Sets the document's certification level.SignerProperties
setContact(java.lang.String contact)
Sets the signing contact.SignerProperties
setFieldLockDict(PdfSigFieldLock fieldLock)
Setter for the field lock dictionary.SignerProperties
setFieldName(java.lang.String fieldName)
Sets the name indicating the field to be signed.SignerProperties
setLocation(java.lang.String location)
Sets the signing location.SignerProperties
setPageNumber(int pageNumber)
Sets the page number of the signature field which this signature appearance is associated with.SignerProperties
setPageRect(Rectangle pageRect)
Sets the rectangle that represent the position and dimension of the signature field in the page.SignerProperties
setReason(java.lang.String reason)
Sets the signing reason.SignerProperties
setSignatureAppearance(SignatureFieldAppearance appearance)
Sets the signature field layout element to customize the appearance of the signature.SignerProperties
setSignatureCreator(java.lang.String signatureCreator)
Sets the name of the application used to create the signature.SignerProperties
setSignDate(java.util.Calendar signDate)
Sets the signature date.
-
-
-
Field Detail
-
fieldLock
private PdfSigFieldLock fieldLock
-
appearance
private SignatureFieldAppearance appearance
-
signDate
private java.util.Calendar signDate
-
certificationLevel
private int certificationLevel
-
fieldName
private java.lang.String fieldName
-
pageNumber
private int pageNumber
-
pageRect
private Rectangle pageRect
-
signatureCreator
private java.lang.String signatureCreator
-
contact
private java.lang.String contact
-
reason
private java.lang.String reason
-
location
private java.lang.String location
-
-
Constructor Detail
-
SignerProperties
public SignerProperties()
Create instance ofSignerProperties
.
-
-
Method Detail
-
getSignDate
public java.util.Calendar getSignDate()
Gets the signature date.- Returns:
- Calendar set to the signature date.
-
setSignDate
public SignerProperties setSignDate(java.util.Calendar signDate)
Sets the signature date.- Parameters:
signDate
- the signature date.- Returns:
- this instance to support fluent interface.
-
setSignatureAppearance
public SignerProperties setSignatureAppearance(SignatureFieldAppearance appearance)
Sets the signature field layout element to customize the appearance of the signature. Signer's sign date will be set.- Parameters:
appearance
- theSignatureFieldAppearance
layout element.- Returns:
- this instance to support fluent interface.
-
getSignatureAppearance
public SignatureFieldAppearance getSignatureAppearance()
Gets signature field layout element, which customizes the appearance of a signature.- Returns:
SignatureFieldAppearance
layout element.
-
getCertificationLevel
public int getCertificationLevel()
Returns the document's certification level. For possible values seesetCertificationLevel(int)
.- Returns:
- The certified status.
-
setCertificationLevel
public SignerProperties setCertificationLevel(int certificationLevel)
Sets the document's certification level.- Parameters:
certificationLevel
- a new certification level for a document. Possible values are:- Returns:
- this instance to support fluent interface.
-
getFieldName
public java.lang.String getFieldName()
Gets the field name.- Returns:
- the field name.
-
setFieldName
public SignerProperties setFieldName(java.lang.String fieldName)
Sets the name indicating the field to be signed. The field can already be presented in the document but shall not be signed. If the field is not presented in the document, it will be created.- Parameters:
fieldName
- The name indicating the field to be signed.- Returns:
- this instance to support fluent interface.
-
getPageNumber
public int getPageNumber()
Provides the page number of the signature field which this signature appearance is associated with.- Returns:
- The page number of the signature field which this signature appearance is associated with.
-
setPageNumber
public SignerProperties setPageNumber(int pageNumber)
Sets the page number of the signature field which this signature appearance is associated with. Implicitly callsPdfSigner.setPageRect(com.itextpdf.kernel.geom.Rectangle)
which considers page number to process the rectangle correctly.- Parameters:
pageNumber
- The page number of the signature field which this signature appearance is associated with.- Returns:
- this instance to support fluent interface.
-
getPageRect
public Rectangle getPageRect()
Provides the rectangle that represent the position and dimension of the signature field in the page.- Returns:
- the rectangle that represent the position and dimension of the signature field in the page
-
setPageRect
public SignerProperties setPageRect(Rectangle pageRect)
Sets the rectangle that represent the position and dimension of the signature field in the page.- Parameters:
pageRect
- The rectangle that represents the position and dimension of the signature field in the page.- Returns:
- this instance to support fluent interface.
-
getFieldLockDict
public PdfSigFieldLock getFieldLockDict()
Getter for the field lock dictionary.- Returns:
- Field lock dictionary.
-
setFieldLockDict
public SignerProperties setFieldLockDict(PdfSigFieldLock fieldLock)
Setter for the field lock dictionary.Be aware: if a signature is created on an existing signature field, then its /Lock dictionary takes the precedence (if it exists).
- Parameters:
fieldLock
- Field lock dictionary.- Returns:
- this instance to support fluent interface.
-
getSignatureCreator
public java.lang.String getSignatureCreator()
Returns the signature creator.- Returns:
- The signature creator.
-
setSignatureCreator
public SignerProperties setSignatureCreator(java.lang.String signatureCreator)
Sets the name of the application used to create the signature.- Parameters:
signatureCreator
- A new name of the application signing a document.- Returns:
- this instance to support fluent interface.
-
getContact
public java.lang.String getContact()
Returns the signing contact.- Returns:
- The signing contact.
-
setContact
public SignerProperties setContact(java.lang.String contact)
Sets the signing contact.- Parameters:
contact
- A new signing contact.- Returns:
- this instance to support fluent interface.
-
getReason
public java.lang.String getReason()
Returns the signing reason.- Returns:
- The signing reason.
-
setReason
public SignerProperties setReason(java.lang.String reason)
Sets the signing reason.- Parameters:
reason
- A new signing reason.- Returns:
- this instance to support fluent interface.
-
getLocation
public java.lang.String getLocation()
Returns the signing location.- Returns:
- The signing location.
-
setLocation
public SignerProperties setLocation(java.lang.String location)
Sets the signing location.- Parameters:
location
- A new signing location.- Returns:
- this instance to support fluent interface.
-
-