public class DigitalSignOptions extends ImageSignOptions
Represents the Digital signature options.
| Constructor and Description |
|---|
DigitalSignOptions()
Initializes a new instance of the DigitalSignOptions class with default values.
|
DigitalSignOptions(InputStream certificateStream)
Initializes a new instance of the DigitalSignOptions class with certificate stream.
|
DigitalSignOptions(InputStream certificateStream,
InputStream appearenceImageStream)
Initializes a new instance of the DigitalSignOptions class with certificate stream and image stream.
|
DigitalSignOptions(InputStream certificateStream,
String imageFilePath)
Initializes a new instance of the DigitalSignOptions class with certificate stream and image file.
|
DigitalSignOptions(String certificateFilePath)
Initializes a new instance of the DigitalSignOptions class with certificate file.
|
DigitalSignOptions(String certificateFilePath,
InputStream appearenceImageStream)
Initializes a new instance of the DigitalSignOptions class with certificate file and image stream.
|
DigitalSignOptions(String certificateFilePath,
String imageFilePath)
Initializes a new instance of the DigitalSignOptions class with certificate file and image file.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getAllowExpired()
Gets or sets a flag that allows signing with a certificate whose validity period has ended.
|
boolean |
getAllowNotYetValid()
Gets or sets a flag that allows signing with a certificate whose validity period has not started yet.
|
String |
getCertificateFilePath()
Gets or sets the digital certificate file path.
|
InputStream |
getCertificateStream()
Gets or sets digital certificate stream.
|
String |
getContact()
Gets or sets the signature contact.
|
com.groupdocs.signature.options.sign.signhash.ICustomSignHash |
getCustomSignHash()
Gets or sets a custom hash-signing implementation, allowing callers to plug in their own
digital signing logic (HSM, remote signer, software keystore, etc.).
|
String |
getLocation()
Gets or sets the signature location.
|
String |
getPassword()
Gets or sets the password of digital certificate.
|
String |
getReason()
Gets or sets the reason of signature.
|
DigitalSignature |
getSignature()
Gets or sets properties of document digital signature.
|
UUID |
getSignatureLineId() |
boolean |
getUseLtv()
Gets/sets LTV (Long Term Validation) validation flag.
|
boolean |
getVisible()
Gets or sets the visibility of signature.
|
int |
getXAdESType()
XAdES type
XAdESType. |
void |
setAllowExpired(boolean value)
Gets or sets a flag that allows signing with a certificate whose validity period has ended.
|
void |
setAllowNotYetValid(boolean value)
Gets or sets a flag that allows signing with a certificate whose validity period has not started yet.
|
void |
setCertificateFilePath(String value)
Gets or sets the digital certificate file GUID.
|
void |
setCertificateStream(InputStream value)
Gets or sets digital certificate stream.
|
void |
setContact(String value)
Gets or sets the signature contact.
|
void |
setCustomSignHash(com.groupdocs.signature.options.sign.signhash.ICustomSignHash value)
Sets a custom hash-signing implementation, allowing callers to plug in their own
digital signing logic.
|
void |
setLocation(String value)
Gets or sets the signature location.
|
void |
setPassword(String value)
Gets or sets the password of digital certificate.
|
void |
setReason(String value)
Gets or sets the reason of signature.
|
void |
setSignature(DigitalSignature value)
Gets or sets properties of document digital signature.
|
void |
setSignatureLineId(UUID value) |
void |
setUseLtv(boolean value)
Gets/sets LTV (Long Term Validation) validation flag.
|
void |
setVisible(boolean value)
Gets or sets the visibility of signature.
|
void |
setXAdESType(int value)
XAdES type
XAdESType. |
String |
toString()
Override string conversion.
|
dispose, fromBase64, getBorder, getHeight, getHorizontalAlignment, getImageFilePath, getImageStream, getLeft, getLocationMeasureType, getMargin, getMarginMeasureType, getRectangle, getRotationAngle, getShapePosition, getSizeMeasureType, getStretch, getTop, getTransparency, getVerticalAlignment, getWidth, setBorder, setHeight, setHorizontalAlignment, setImageFilePath, setImageStream, setLeft, setLocationMeasureType, setMargin, setMarginMeasureType, setRotationAngle, setShapePosition, setSizeMeasureType, setStretch, setTop, setTransparency, setVerticalAlignment, setWidthaddSignature, getAllPages, getAppearance, getDocumentType, getExtensions, getHashAlgorithm, getPageNumber, getPagesSetup, getSignatureType, getZOrder, setAllPages, setAppearance, setDocumentType, setExtensions, setHashAlgorithm, setPageNumber, setPagesSetup, setZOrderpublic DigitalSignOptions()
Initializes a new instance of the DigitalSignOptions class with default values.
public DigitalSignOptions(InputStream certificateStream)
Initializes a new instance of the DigitalSignOptions class with certificate stream.
certificateStream - Digital Certificate streampublic DigitalSignOptions(InputStream certificateStream, InputStream appearenceImageStream)
Initializes a new instance of the DigitalSignOptions class with certificate stream and image stream.
certificateStream - Digital Certificate streamappearenceImageStream - Signature Appearance image streampublic DigitalSignOptions(InputStream certificateStream, String imageFilePath)
Initializes a new instance of the DigitalSignOptions class with certificate stream and image file.
certificateStream - Digital Certificate streamimageFilePath - Signature Appearance image file pathpublic DigitalSignOptions(String certificateFilePath)
Initializes a new instance of the DigitalSignOptions class with certificate file.
certificateFilePath - Digital certificate file pathpublic DigitalSignOptions(String certificateFilePath, InputStream appearenceImageStream)
Initializes a new instance of the DigitalSignOptions class with certificate file and image stream.
certificateFilePath - Digital certificate file pathappearenceImageStream - Signature Appearance image streampublic DigitalSignOptions(String certificateFilePath, String imageFilePath)
Initializes a new instance of the DigitalSignOptions class with certificate file and image file.
certificateFilePath - Digital certificate file pathimageFilePath - Signature Appearance image file pathpublic final boolean getAllowExpired()
Gets or sets a flag that allows signing with a certificate whose validity period has ended.
The default value is false: signing with an expired certificate throws GroupDocsSignatureException,
and the document is not signed.
Validators report a signature made with an expired certificate as not valid. Set this property to true only when
you need such a signature anyway, for example to test with an old certificate. The document is then signed, and a
warning is written to the logger set in SignatureSettings.
The certificate is compared with the current time in UTC, not with DigitalSignature.SignTime. The flag
applies to the certificate given by CertificateFilePath, CertificateStream or Signature,
and, when a spreadsheet is signed, to the certificate of the first DigitalVBA extension. Digital
signatures of images do not use a certificate and are not checked. A certificate whose validity period has not
started yet is controlled by AllowNotYetValid.
public final boolean getAllowNotYetValid()
Gets or sets a flag that allows signing with a certificate whose validity period has not started yet.
The default value is false: signing with such a certificate throws GroupDocsSignatureException,
and the document is not signed.
Validators report a signature made before the certificate becomes valid as not valid. Such a certificate was
usually issued for a later date, or the computer's clock is wrong. When this property is true, the document is
signed, and a warning is written to the logger set in SignatureSettings.
The certificate is compared with the current time in UTC. The flag applies to the same certificates as
AllowExpired, which controls certificates whose validity period has ended.
public final String getCertificateFilePath()
Gets or sets the digital certificate file path. This property is used only if CertificateStream is not specified.
public final InputStream getCertificateStream()
Gets or sets digital certificate stream. If this property is specified it is always used instead CertificateGuid.
public final String getContact()
Gets or sets the signature contact.
public final com.groupdocs.signature.options.sign.signhash.ICustomSignHash getCustomSignHash()
Gets or sets a custom hash-signing implementation, allowing callers to plug in their own digital signing logic (HSM, remote signer, software keystore, etc.).
public final String getLocation()
Gets or sets the signature location.
public final String getPassword()
Gets or sets the password of digital certificate.
public final String getReason()
Gets or sets the reason of signature.
public final DigitalSignature getSignature()
Gets or sets properties of document digital signature.
public final UUID getSignatureLineId()
public final boolean getUseLtv()
Gets/sets LTV (Long Term Validation) validation flag.
public final boolean getVisible()
Gets or sets the visibility of signature.
public final int getXAdESType()
XAdES type XAdESType. Default value is None (XAdES is off).
At this moment XAdES signature type is supported only for Spreadsheet documents under .NET Framework only (not under .NET Standard)
public final void setAllowExpired(boolean value)
Gets or sets a flag that allows signing with a certificate whose validity period has ended.
The default value is false. See getAllowExpired().
public final void setAllowNotYetValid(boolean value)
Gets or sets a flag that allows signing with a certificate whose validity period has not started yet.
The default value is false. See getAllowNotYetValid().
public void setCertificateFilePath(String value)
Gets or sets the digital certificate file GUID. This property is used only if CertificateStream is not specified.
public final void setCertificateStream(InputStream value)
Gets or sets digital certificate stream. If this property is specified it is always used instead CertificateGuid.
public final void setContact(String value)
Gets or sets the signature contact.
public final void setCustomSignHash(com.groupdocs.signature.options.sign.signhash.ICustomSignHash value)
Sets a custom hash-signing implementation, allowing callers to plug in their own digital signing logic.
public final void setLocation(String value)
Gets or sets the signature location.
public final void setPassword(String value)
Gets or sets the password of digital certificate.
public final void setReason(String value)
Gets or sets the reason of signature.
public final void setSignature(DigitalSignature value)
Gets or sets properties of document digital signature.
public final void setSignatureLineId(UUID value)
public final void setUseLtv(boolean value)
Gets/sets LTV (Long Term Validation) validation flag.
public final void setVisible(boolean value)
Gets or sets the visibility of signature.
public final void setXAdESType(int value)
XAdES type XAdESType. Default value is None (XAdES is off).
At this moment XAdES signature type is supported only for Spreadsheet documents under .NET Framework only (not under .NET Standard)
public String toString()
Override string conversion.
toString in class ImageSignOptionsCopyright © 2026 GroupDocs. All rights reserved.