public class SignerProperties extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
IGNORED_ID
This string could be used to create the
SignatureFieldAppearance instance which will be used for signing
since its ID will be ignored anyway in that case, and specified ID won't override the field name. |
| Constructor and Description |
|---|
SignerProperties()
Create instance of
SignerProperties. |
| Modifier and Type | Method and Description |
|---|---|
AccessPermissions |
getCertificationLevel()
Returns the document's certification level.
|
Calendar |
getClaimedSignDate()
Gets the signature date.
|
String |
getContact()
Returns the signing contact.
|
PdfSigFieldLock |
getFieldLockDict()
Getter for the field lock dictionary.
|
String |
getFieldName()
Gets the field name.
|
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.
|
String |
getReason()
Returns the signing reason.
|
SignatureFieldAppearance |
getSignatureAppearance()
Gets signature field appearance object representing the appearance of the signature.
|
String |
getSignatureCreator()
Returns the signature creator.
|
SignerProperties |
setCertificationLevel(AccessPermissions accessPermissions)
Sets the document's certification level.
|
SignerProperties |
setClaimedSignDate(Calendar signDate)
Sets the signature date.
|
SignerProperties |
setContact(String contact)
Sets the signing contact.
|
SignerProperties |
setFieldLockDict(PdfSigFieldLock fieldLock)
Setter for the field lock dictionary.
|
SignerProperties |
setFieldName(String fieldName)
Sets the name indicating the field to be signed.
|
SignerProperties |
setLocation(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(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(String signatureCreator)
Sets the name of the application used to create the signature.
|
public static final String IGNORED_ID
SignatureFieldAppearance instance which will be used for signing
since its ID will be ignored anyway in that case, and specified ID won't override the field name.public SignerProperties()
SignerProperties.public Calendar getClaimedSignDate()
public SignerProperties setClaimedSignDate(Calendar signDate)
signDate - the signature datepublic SignerProperties setSignatureAppearance(SignatureFieldAppearance appearance)
SignatureFieldAppearance will be ignored and won't override field name, so
IGNORED_ID could be used. To specify signature name use setFieldName(java.lang.String).
Note that if SignedAppearanceText was set as the content (or part of the content)
for SignatureFieldAppearance object, PdfSigner properties such as signing date, reason, location
and signer name could be set automatically.
In case you create new signature field (either using setFieldName(java.lang.String) with the name
that doesn't exist in the document or do not specifying it at all) then the signature is invisible by default.
Use setPageRect(Rectangle) and setPageNumber(int) to provide
the rectangle that represent the position and dimension of the signature field in the specified page.
It is possible to set other appearance related properties such as
PdfSignatureFormField.setReuseAppearance(boolean), PdfSignatureFormField.setBackgroundLayer(com.itextpdf.kernel.pdf.xobject.PdfFormXObject) (n0 layer) and
PdfSignatureFormField.setSignatureAppearanceLayer(com.itextpdf.kernel.pdf.xobject.PdfFormXObject) (n2 layer) for the signature field using
PdfSigner.getSignatureField(). Page, rectangle and other properties could be also set up via
SignerProperties.
appearance - the SignatureFieldAppearance layout element representing signature appearancepublic SignatureFieldAppearance getSignatureAppearance()
To customize the signature appearance, create new SignatureFieldAppearance object and set it
using setSignatureAppearance(SignatureFieldAppearance).
SignatureFieldAppearance object representing signature appearancepublic AccessPermissions getCertificationLevel()
AccessPermissions.AccessPermissions enum which specifies which certification level shall be usedpublic SignerProperties setCertificationLevel(AccessPermissions accessPermissions)
accessPermissions - AccessPermissions enum which specifies which certification level shall be usedpublic String getFieldName()
public SignerProperties setFieldName(String fieldName)
Note that ID specified for SignatureFieldAppearance set by setSignatureAppearance(com.itextpdf.forms.form.element.SignatureFieldAppearance) will be
ignored and won't override the field name.
fieldName - the name indicating the field to be signedpublic int getPageNumber()
public SignerProperties setPageNumber(int pageNumber)
pageNumber - the page number of the signature field which this signature appearance is associated withpublic Rectangle getPageRect()
public SignerProperties setPageRect(Rectangle pageRect)
pageRect - the rectangle that represents the position and dimension of the signature field in the pagepublic PdfSigFieldLock getFieldLockDict()
public SignerProperties setFieldLockDict(PdfSigFieldLock fieldLock)
Be aware: if a signature is created on an existing signature field, then its /Lock dictionary takes the precedence (if it exists).
fieldLock - field lock dictionarypublic String getSignatureCreator()
public SignerProperties setSignatureCreator(String signatureCreator)
signatureCreator - A new name of the application signing a document.public String getContact()
public SignerProperties setContact(String contact)
contact - a new signing contactpublic String getReason()
public SignerProperties setReason(String reason)
reason - a new signing reasonpublic String getLocation()
public SignerProperties setLocation(String location)
location - a new signing locationCopyright © 1998–2025 Apryse Group NV. All rights reserved.