|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.spire.pdf.security.PdfSignature
public class PdfSignature
Represents a digital signature used for signing a PDF document.
| Constructor Summary | |
|---|---|
PdfSignature()
Initializes a new instance of the class. |
|
PdfSignature(PdfDocumentBase document,
PdfPageBase page,
PdfCertificate certificate,
java.lang.String signatureName)
Initializes a new instance of the class. |
|
PdfSignature(PdfDocumentBase document,
PdfPageBase page,
PdfCertificate certificate,
java.lang.String signatureName,
PdfSignatureFieldWidget fieldWidget)
Initializes a new instance of the class. |
|
PdfSignature(PdfDocumentBase document,
PdfPageBase page,
PdfCertificate certificate,
java.lang.String signatureName,
java.awt.geom.Rectangle2D bounds)
Initializes a new instance of the class. |
|
PdfSignature(PdfDocument document,
PdfPageBase page,
PdfCertificate certificate,
java.lang.String signatureName)
Initializes a new instance of the class. |
|
PdfSignature(PdfDocument document,
PdfPageBase page,
PdfCertificate certificate,
java.lang.String signatureName,
PdfSignatureFieldWidget fieldWidget)
Initializes a new instance of the class. |
|
PdfSignature(PdfDocument document,
PdfPageBase page,
PdfCertificate certificate,
java.lang.String signatureName,
java.awt.geom.Rectangle2D bounds)
Initializes a new instance of the class. |
|
PdfSignature(PdfNewPage page,
PdfCertificate cert,
java.lang.String signatureName)
Initializes a new instance of the class. |
|
| Method Summary | |
|---|---|
void |
addShowConfigureText(SignatureConfigureText config)
|
void |
configureCustomOCSP(IOCSPResponseGenerate handler,
com.spire.ms.System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraCertificates)
Configure OCSP which must conform to RFC 2560. |
void |
configureHttpOCSP(java.lang.String ocspUrl,
com.spire.ms.System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraCertificates)
Configure OCSP which must conform to RFC 2560. |
void |
configureTimestamp(IGenerateTimestamp handler)
Configure timestamp which must conform to RFC 3161. |
void |
configureTimestamp(java.lang.String tsaUrl)
Configure timestamp which must conform to RFC 3161. |
void |
configureTimestamp(java.lang.String tsaUrl,
java.lang.String tsaUserName,
java.lang.String tsaPassword)
Configure timestamp which must conform to RFC 3161. |
java.awt.geom.Rectangle2D |
getBounds()
Gets or sets bounds of signature. |
PdfCertificate |
getCertificate()
Gets signing certificate. |
com.spire.ms.System.Security.Cryptography.X509Certificates.X509Certificate2Collection |
getCertificates()
Get all certificates. |
ConfiguerGraphicType |
getConfigGraphicType()
Digital Signature Graphic Type |
java.lang.String |
getContactInfo()
Gets or sets information provided by the signer to enable a recipient to contact the signer to verify the signature; for example, a phone number. |
java.lang.String |
getContactInfoLabel()
Digital Signature ContactInfo Label |
boolean |
getCustomSignPosition()
|
java.util.Date |
getDate()
Get Signature Datetime |
java.lang.String |
getDigitalSigner()
Deprecated. |
java.lang.String |
getDigitalSignerLable()
Deprecated. |
java.awt.geom.Point2D |
getLocation()
Gets or sets signature location on the page. |
java.lang.String |
getLocationInfo()
Gets the physical location of the signing. |
java.lang.String |
getLocationInfoLabel()
Digital Signature LocationInfo Label |
java.lang.String |
getName()
Digital Signature Common name |
java.lang.String |
getNameLabel()
Digital Signature Common name label |
java.lang.String |
getReason()
Gets or sets reason of signing. |
java.lang.String |
getReasonLabel()
Digital Signature Reason Label |
java.util.EnumSet<SignatureConfigureText> |
getShowConfigureText()
Show Digital Signature,Configuer Text |
java.lang.String |
getSignatureName()
get/set pdf signature name |
java.util.HashMap |
getSignInfoFont()
get signature info font |
SignTextAlignment |
getSignTextAlignment()
Sets the alignment of signature text |
boolean |
getVisible()
Gets a value indicating whether signature visible or not. |
boolean |
isTag()
Digital Signature Whether to display the label |
void |
isTag(boolean value)
Digital Signature Whether to display the label |
void |
removeShowConfigureText(SignatureConfigureText config)
|
void |
setBounds(java.awt.geom.Rectangle2D value)
Gets or sets bounds of signature. |
void |
setCertificated(boolean value)
Sets a value indicating certificate document or not. |
void |
setConfigGraphicType(ConfiguerGraphicType value)
Deprecated. |
void |
setContactInfo(java.lang.String value)
Sets information provided by the signer to enable a recipient to contact |
void |
setContactInfoLabel(java.lang.String value)
Digital Signature ContactInfo Label |
void |
setCustomSignDetailPosition(float infoX,
float infoY,
float infoWidth,
float infoHeight)
Define sign anem ,unit is percent,for example,whole area0,0,1,1... |
void |
setCustomSignImagePosition(float imageX,
float imageY,
float imageWidth,
float imageHeight)
Define sign image area,unit is percent,for example,whole area0,0,1,1... |
void |
setCustomSignNamePosition(float nameX,
float nameY,
float nameWidth,
float nameHeight)
Define sign anem ,unit is percent,for example,whole area0,0,1,1... |
void |
setCustomSignPosition(boolean customSignPosition)
|
void |
setDate(java.util.Date value)
Set Signature Date |
void |
setDateLabel(java.lang.String value)
Digital Signature Date Label |
void |
setDigitalSigner(java.lang.String value)
Deprecated. |
void |
setDigitalSignerLable(java.lang.String value)
Deprecated. |
void |
setDistinguishedName(java.lang.String value)
Sets DistinguishedName values |
void |
setDistinguishedNameLabel(java.lang.String value)
Set Digital Signature Distinguished Label |
void |
setDocumentPermissions(PdfCertificationFlags value)
Sets the permission for certificated document. |
void |
setGraphicMode(GraphicMode value)
Digital Signature Graphic Type |
void |
setLocation(java.awt.geom.Point2D value)
sets signature location on the page. |
void |
setLocationInfo(java.lang.String value)
Sets the physical location of the signing. |
void |
setLocationInfoLabel(java.lang.String value)
Set digital Signature LocationInfo Label |
void |
setLock(boolean lock)
A signature field lock dictionary that specifies a set of form fields to be locked when this signature field is signed. |
void |
setName(java.lang.String value)
Set digital Signature Common name |
void |
setNameLabel(java.lang.String value)
Set digital Signature Common name label |
void |
setReason(java.lang.String value)
Sets reason of signing |
void |
setReasonLabel(java.lang.String value)
Digital Signature Reason Label |
void |
setShowConfigureText(java.util.EnumSet<SignatureConfigureText> value)
|
void |
setSignatureName(java.lang.String value)
|
void |
setSignDetailsFont(PdfFontBase value)
Set the SignDetails font. |
void |
setSignFontColor(com.spire.ms.System.Drawing.Color value)
Set font color for the signature info if not set, the default is black |
void |
setSignImageLayout(SignImageLayout value)
set the sign image layout. |
void |
setSignImageSource(PdfImage value)
Digital Signature Configuer Graphic file Path |
void |
setSignInfoFont(java.util.HashMap value)
|
void |
setSignNameFont(PdfFontBase value)
Set the sign name font. |
void |
setSignTextAlignment(SignTextAlignment value)
Sets the alignment of signature text |
boolean |
verifyDocModified()
Check if the document was altered after signed. |
boolean |
verifySignature()
check thie validity of the signature |
| Constructor Detail |
|---|
public PdfSignature()
public PdfSignature(PdfNewPage page,
PdfCertificate cert,
java.lang.String signatureName)
page - The current pdf page where signature will be replaced.cert - The pdf certificate.signatureName - Name of the signature.
com.spire.ms.System.Exception
public PdfSignature(PdfDocumentBase document,
PdfPageBase page,
PdfCertificate certificate,
java.lang.String signatureName)
document - The document, which has the page.page - The current pdf page where signature will be replaced.certificate - The pdf certificate.signatureName - Name of the signature.
com.spire.ms.System.Exception
public PdfSignature(PdfDocumentBase document,
PdfPageBase page,
PdfCertificate certificate,
java.lang.String signatureName,
java.awt.geom.Rectangle2D bounds)
document - The document, which has the page.page - The page.certificate - The certificate.signatureName - The name of the signature.bounds - The bounds
public PdfSignature(PdfDocumentBase document,
PdfPageBase page,
PdfCertificate certificate,
java.lang.String signatureName,
PdfSignatureFieldWidget fieldWidget)
document - The loaded document, which has the page.page - The page.certificate - The certificate.signatureName - The name of the signature.fieldWidget - The name of the loaded signature field.
com.spire.ms.System.Exception
public PdfSignature(PdfDocument document,
PdfPageBase page,
PdfCertificate certificate,
java.lang.String signatureName,
java.awt.geom.Rectangle2D bounds)
document - The document or loaded document, which has the page.page - The page.certificate - The certificate.signatureName - The name of the signature.bounds - The bounds
com.spire.ms.System.Exception
public PdfSignature(PdfDocument document,
PdfPageBase page,
PdfCertificate certificate,
java.lang.String signatureName)
document - The document or loaded document, which has the page.page - The page.certificate - The certificate.signatureName - The name of the signature.
com.spire.ms.System.Exception
public PdfSignature(PdfDocument document,
PdfPageBase page,
PdfCertificate certificate,
java.lang.String signatureName,
PdfSignatureFieldWidget fieldWidget)
document - The document or loaded document, which has the page.page - The page.certificate - The certificate.signatureName - The name of the signature.fieldWidget - The name of the loaded signature field.
com.spire.ms.System.Exception| Method Detail |
|---|
public com.spire.ms.System.Security.Cryptography.X509Certificates.X509Certificate2Collection getCertificates()
public java.awt.geom.Point2D getLocation()
public void setLocation(java.awt.geom.Point2D value)
value - public java.awt.geom.Rectangle2D getBounds()
public void setBounds(java.awt.geom.Rectangle2D value)
public java.lang.String getContactInfo()
public void setContactInfo(java.lang.String value)
value - the signer to verify the signature; for example, a phone numberpublic java.lang.String getReason()
public void setReason(java.lang.String value)
public java.lang.String getLocationInfo()
public void setLocationInfo(java.lang.String value)
value - LocationInfopublic void setCertificated(boolean value)
value - certificate document if true.public void setDocumentPermissions(PdfCertificationFlags value)
value - The pdfCertificationFlagspublic PdfCertificate getCertificate()
com.spire.ms.System.Exceptionpublic SignTextAlignment getSignTextAlignment()
public void setSignTextAlignment(SignTextAlignment value)
public boolean getVisible()
public java.util.Date getDate()
public void setDate(java.util.Date value)
public java.lang.String getSignatureName()
public void setSignatureName(java.lang.String value)
public void setSignNameFont(PdfFontBase value)
value - public void setSignFontColor(com.spire.ms.System.Drawing.Color value)
value - public void setSignDetailsFont(PdfFontBase value)
value - public java.util.HashMap getSignInfoFont()
public void setSignInfoFont(java.util.HashMap value)
@Deprecated public java.lang.String getDigitalSigner()
@Deprecated public void setDigitalSigner(java.lang.String value)
@Deprecated public java.lang.String getDigitalSignerLable()
@Deprecated public void setDigitalSignerLable(java.lang.String value)
public java.lang.String getName()
public void setName(java.lang.String value)
public java.lang.String getNameLabel()
public void setNameLabel(java.lang.String value)
public void setDistinguishedNameLabel(java.lang.String value)
public void setDistinguishedName(java.lang.String value)
value - public boolean isTag()
public void isTag(boolean value)
public java.util.EnumSet<SignatureConfigureText> getShowConfigureText()
public void setShowConfigureText(java.util.EnumSet<SignatureConfigureText> value)
public void addShowConfigureText(SignatureConfigureText config)
public void removeShowConfigureText(SignatureConfigureText config)
public void setGraphicMode(GraphicMode value)
public void setCustomSignPosition(boolean customSignPosition)
public boolean getCustomSignPosition()
public void setCustomSignImagePosition(float imageX,
float imageY,
float imageWidth,
float imageHeight)
public void setCustomSignNamePosition(float nameX,
float nameY,
float nameWidth,
float nameHeight)
public void setCustomSignDetailPosition(float infoX,
float infoY,
float infoWidth,
float infoHeight)
public ConfiguerGraphicType getConfigGraphicType()
@Deprecated public void setConfigGraphicType(ConfiguerGraphicType value)
public void setSignImageSource(PdfImage value)
public void setSignImageLayout(SignImageLayout value)
public java.lang.String getReasonLabel()
public void setReasonLabel(java.lang.String value)
public void setDateLabel(java.lang.String value)
public java.lang.String getContactInfoLabel()
public void setContactInfoLabel(java.lang.String value)
public java.lang.String getLocationInfoLabel()
public void setLocationInfoLabel(java.lang.String value)
public void setLock(boolean lock)
public boolean verifySignature()
public boolean verifyDocModified()
public void configureTimestamp(java.lang.String tsaUrl)
tsaUrl - TSA url
com.spire.ms.System.Exception
public void configureTimestamp(java.lang.String tsaUrl,
java.lang.String tsaUserName,
java.lang.String tsaPassword)
tsaUrl - TSA urltsaUserName - TSA usernametsaPassword - TSA password
com.spire.ms.System.Exceptionpublic void configureTimestamp(IGenerateTimestamp handler)
handler -
public void configureHttpOCSP(java.lang.String ocspUrl,
com.spire.ms.System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraCertificates)
ocspUrl - OCSP url. It it's null it will be taken from the checked cert.extraCertificates - Represents an additional collection of certificates that can be searched.
if null,only use windows cert store.
com.spire.ms.System.Exception
public void configureCustomOCSP(IOCSPResponseGenerate handler,
com.spire.ms.System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraCertificates)
handler - the handler which generate OCSP response.extraCertificates - Represents an additional collection of certificates that can be searched
if null,only use windows cert store.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||