| Modifier and Type | Class and Description |
|---|---|
static class |
PdfSignatureAppearance.RenderingMode
Signature rendering modes.
|
| Modifier | Constructor and Description |
|---|---|
protected |
PdfSignatureAppearance(PdfDocument document,
Rectangle pageRect,
int pageNumber)
Creates a PdfSignatureAppearance.
|
| Modifier and Type | Method and Description |
|---|---|
protected PdfFormXObject |
getAppearance()
Constructs appearance (top-level) for a signature.
|
Certificate |
getCertificate()
Get the signing certificate.
|
String |
getContact()
Returns the signing contact.
|
com.itextpdf.io.image.ImageData |
getImage()
Gets the background image for the layer 2.
|
float |
getImageScale()
Gets the scaling to be applied to the background image.
|
PdfFormXObject |
getLayer0()
Get Layer 0 of the appearance.
|
PdfFormXObject |
getLayer2()
Get Layer 2 of the appearance.
|
PdfFont |
getLayer2Font()
Gets the n2 and n4 layer font.
|
Color |
getLayer2FontColor()
Gets the n2 and n4 layer font color.
|
float |
getLayer2FontSize()
Gets the n2 and n4 layer font size.
|
String |
getLayer2Text()
Gets the signature text identifying the signer if set by setLayer2Text().
|
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.
|
PdfSignatureAppearance.RenderingMode |
getRenderingMode()
Gets the rendering mode for this signature.
|
String |
getSignatureCreator()
Returns the signature creator.
|
com.itextpdf.io.image.ImageData |
getSignatureGraphic()
Gets the Image object to render.
|
protected Calendar |
getSignDate()
Returns the signature date.
|
boolean |
isInvisible()
Gets the visibility status of the signature.
|
PdfSignatureAppearance |
setCertificate(Certificate signCertificate)
Sets the certificate used to provide the text in the appearance.
|
PdfSignatureAppearance |
setContact(String contact)
Sets the signing contact.
|
protected PdfSignatureAppearance |
setFieldName(String fieldName)
Set the field name of the appearance.
|
PdfSignatureAppearance |
setImage(com.itextpdf.io.image.ImageData image)
Sets the background image for the layer 2.
|
PdfSignatureAppearance |
setImageScale(float imageScale)
Sets the scaling to be applied to the background image.
|
PdfSignatureAppearance |
setLayer2Font(PdfFont layer2Font)
Sets the n2 and n4 layer font.
|
PdfSignatureAppearance |
setLayer2FontColor(Color color)
Sets the n2 and n4 layer font color.
|
PdfSignatureAppearance |
setLayer2FontSize(float fontSize)
Sets the n2 and n4 layer font size.
|
PdfSignatureAppearance |
setLayer2Text(String text)
Sets the signature text identifying the signer.
|
PdfSignatureAppearance |
setLocation(String location)
Sets the signing location.
|
PdfSignatureAppearance |
setLocationCaption(String locationCaption)
Sets the caption for the signing location.
|
PdfSignatureAppearance |
setPageNumber(int pageNumber)
Sets the page number of the signature field which this signature
appearance is associated with.
|
PdfSignatureAppearance |
setPageRect(Rectangle pageRect)
Sets the rectangle that represent the position and dimension of
the signature field in the page.
|
PdfSignatureAppearance |
setReason(String reason)
Sets the signing reason.
|
PdfSignatureAppearance |
setReasonCaption(String reasonCaption)
Sets the caption for the signing reason.
|
PdfSignatureAppearance |
setRenderingMode(PdfSignatureAppearance.RenderingMode renderingMode)
Sets the rendering mode for this signature.
|
PdfSignatureAppearance |
setReuseAppearance(boolean reuseAppearance)
Indicates that the existing appearances needs to be reused as layer 0.
|
PdfSignatureAppearance |
setSignatureCreator(String signatureCreator)
Sets the name of the application used to create the signature.
|
PdfSignatureAppearance |
setSignatureGraphic(com.itextpdf.io.image.ImageData signatureGraphic)
Sets the Image object to render when Render is set to RenderingMode.GRAPHIC or RenderingMode.GRAPHIC_AND_DESCRIPTION.
|
protected PdfSignatureAppearance |
setSignDate(Calendar signDate)
Sets the signature date.
|
protected PdfSignatureAppearance(PdfDocument document, Rectangle pageRect, int pageNumber)
document - PdfDocumentpageRect - Rectangle of the appearancepageNumber - Number of the page the appearance should be onpublic int getPageNumber()
public PdfSignatureAppearance setPageNumber(int pageNumber)
setPageRect(com.itextpdf.kernel.geom.Rectangle)
which considers page number to process the rectangle correctly.pageNumber - The page number of the signature field which
this signature appearance is associated with.public Rectangle getPageRect()
public PdfSignatureAppearance setPageRect(Rectangle pageRect)
pageRect - The rectangle that represents the position and
dimension of the signature field in the page.public PdfFormXObject getLayer0()
The size of the layer is determined by the rectangle set via
setPageRect(Rectangle)
public PdfFormXObject getLayer2()
The size of the layer is determined by the rectangle set via
setPageRect(Rectangle)
public PdfSignatureAppearance.RenderingMode getRenderingMode()
public PdfSignatureAppearance setRenderingMode(PdfSignatureAppearance.RenderingMode renderingMode)
renderingMode - the rendering modepublic String getReason()
public PdfSignatureAppearance setReason(String reason)
reason - signing reason.public PdfSignatureAppearance setReasonCaption(String reasonCaption)
reasonCaption - A new signing reason captionpublic String getLocation()
public PdfSignatureAppearance setLocation(String location)
location - A new signing locationpublic PdfSignatureAppearance setLocationCaption(String locationCaption)
locationCaption - A new signing location captionpublic String getSignatureCreator()
public PdfSignatureAppearance setSignatureCreator(String signatureCreator)
signatureCreator - A new name of the application signing a documentpublic String getContact()
public PdfSignatureAppearance setContact(String contact)
contact - A new signing contactpublic PdfSignatureAppearance setCertificate(Certificate signCertificate)
signCertificate - the certificatepublic Certificate getCertificate()
public com.itextpdf.io.image.ImageData getSignatureGraphic()
public PdfSignatureAppearance setSignatureGraphic(com.itextpdf.io.image.ImageData signatureGraphic)
signatureGraphic - image rendered. If null the mode is defaulted to RenderingMode.DESCRIPTIONpublic PdfSignatureAppearance setReuseAppearance(boolean reuseAppearance)
reuseAppearance - is an appearances reusing flag value to setpublic com.itextpdf.io.image.ImageData getImage()
public PdfSignatureAppearance setImage(com.itextpdf.io.image.ImageData image)
image - the background image for the layer 2public float getImageScale()
public PdfSignatureAppearance setImageScale(float imageScale)
imageScale - the scaling to be applied to the background imagepublic PdfSignatureAppearance setLayer2Text(String text)
text - the signature text identifying the signer. If null or not set
a standard description will be usedpublic String getLayer2Text()
public PdfFont getLayer2Font()
public PdfSignatureAppearance setLayer2Font(PdfFont layer2Font)
layer2Font - the n2 and n4 fontpublic PdfSignatureAppearance setLayer2FontSize(float fontSize)
fontSize - font sizepublic float getLayer2FontSize()
public PdfSignatureAppearance setLayer2FontColor(Color color)
color - font colorpublic Color getLayer2FontColor()
public boolean isInvisible()
protected PdfFormXObject getAppearance() throws IOException
IOException - if font cannot be createdprotected Calendar getSignDate()
protected PdfSignatureAppearance setSignDate(Calendar signDate)
signDate - A new signature dateprotected PdfSignatureAppearance setFieldName(String fieldName)
fieldName - name of the fieldCopyright © 1998–2024 Apryse Group NV. All rights reserved.