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.
|
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.
|
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.
|
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(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 |
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(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
- PdfDocument
pageRect
- Rectangle of the appearance
pageNumber
- Number of the page the appearance should be on
public int getPageNumber()
public PdfSignatureAppearance setPageNumber(int pageNumber)
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()
public PdfFormXObject getLayer2()
public PdfSignatureAppearance.RenderingMode getRenderingMode()
public PdfSignatureAppearance setRenderingMode(PdfSignatureAppearance.RenderingMode renderingMode)
renderingMode
- the rendering mode
public String getReason()
public PdfSignatureAppearance setReason(String reason)
reason
- signing reason.
public PdfSignatureAppearance setReasonCaption(String reasonCaption)
reasonCaption
- A new signing reason caption
public String getLocation()
public PdfSignatureAppearance setLocation(String location)
location
- A new signing location
public PdfSignatureAppearance setLocationCaption(String locationCaption)
locationCaption
- A new signing location caption
public String getSignatureCreator()
public PdfSignatureAppearance setSignatureCreator(String signatureCreator)
signatureCreator
- A new name of the application signing a document
public String getContact()
public PdfSignatureAppearance setContact(String contact)
contact
- A new signing contact
public PdfSignatureAppearance setCertificate(Certificate signCertificate)
signCertificate
- the certificate
public Certificate getCertificate()
public ImageData getSignatureGraphic()
public PdfSignatureAppearance setSignatureGraphic(ImageData signatureGraphic)
signatureGraphic
- image rendered. If null the mode is defaulted to RenderingMode.DESCRIPTION
public PdfSignatureAppearance setReuseAppearance(boolean reuseAppearance)
public ImageData getImage()
public PdfSignatureAppearance setImage(ImageData image)
image
- the background image for the layer 2
public float getImageScale()
public PdfSignatureAppearance setImageScale(float imageScale)
imageScale
- the scaling to be applied to the background image
public PdfSignatureAppearance setLayer2Text(String text)
text
- the signature text identifying the signer. If null or not set a standard description will be used
public String getLayer2Text()
public PdfFont getLayer2Font()
public PdfSignatureAppearance setLayer2Font(PdfFont layer2Font)
layer2Font
- the n2 and n4 font
public PdfSignatureAppearance setLayer2FontSize(float fontSize)
fontSize
- font size
public boolean isInvisible()
protected PdfFormXObject getAppearance() throws IOException
Consult PPKAppearances.pdf for further details.
IOException
protected Calendar getSignDate()
protected PdfSignatureAppearance setSignDate(Calendar signDate)
signDate
- A new signature date
protected PdfSignatureAppearance setFieldName(String fieldName)
fieldName
- name of the field
Copyright © 1998–2018 iText Group NV. All rights reserved.