Class PdfDigitalSignatureDetails
Namespace: Aspose.Words.Saving
Assembly: Aspose.Words.dll (25.3.0)
Contains details for signing a PDF document with a digital signature.
public class PdfDigitalSignatureDetails
Inheritance
object ← PdfDigitalSignatureDetails
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
At the moment digitally signing PDF documents is only available on .NET 3.5 or higher.
To digitally sign a PDF document when it is created by Aspose.Words, set the Aspose.Words.Saving.PdfSaveOptions.DigitalSignatureDetails property to a valid Aspose.Words.Saving.PdfDigitalSignatureDetails object and then save the document in the PDF format passing the Aspose.Words.Saving.PdfSaveOptions as a parameter into the Aspose.Words.Document.Save(System.String,Aspose.Words.Saving.SaveOptions) method.
Aspose.Words creates a PKCS#7 signature over the whole PDF document and uses the "Adobe.PPKMS" filter and "adbe.pkcs7.sha1" subfilter when creating a digital signature.
Aspose.Words.Saving.PdfSaveOptions.DigitalSignatureDetailsConstructors
PdfDigitalSignatureDetails()
Initializes an instance of this class.
public PdfDigitalSignatureDetails()
PdfDigitalSignatureDetails(CertificateHolder, string, string, DateTime)
Initializes an instance of this class.
public PdfDigitalSignatureDetails(CertificateHolder certificateHolder, string reason, string location, DateTime signatureDate)
Parameters
certificateHolder
CertificateHolder
A certificate holder which contains the certificate itself.
reason
string
The reason for signing.
location
string
The location of signing.
signatureDate
DateTime
The date and time of signing.
Properties
CertificateHolder
Returns the certificate holder object that contains the certificate was used to sign the document.
public CertificateHolder CertificateHolder { get; set; }
Property Value
HashAlgorithm
Gets or sets the hash algorithm.
public PdfDigitalSignatureHashAlgorithm HashAlgorithm { get; set; }
Property Value
PdfDigitalSignatureHashAlgorithm
Remarks
The default value is the SHA-256 algorithm.
Location
Gets or sets the location of the signing.
public string Location { get; set; }
Property Value
Remarks
The default value is null
.
Reason
Gets or sets the reason for the signing.
public string Reason { get; set; }
Property Value
Remarks
The default value is null
.
SignatureDate
Gets or sets the date of the signing.
public DateTime SignatureDate { get; set; }
Property Value
Remarks
The default value is the current time.
This value will appear in the digital signature as an unverified computer time.
TimestampSettings
Gets or sets the digital signature timestamp settings.
public PdfDigitalSignatureTimestampSettings TimestampSettings { get; set; }
Property Value
PdfDigitalSignatureTimestampSettings
Remarks
The default value is null
and the digital signature will not be time-stamped.
When this property is set to a valid Aspose.Words.Saving.PdfDigitalSignatureTimestampSettings object,
then the digital signature in the PDF document will be time-stamped.