PdfDigitalSignatureDetails class

Contains details for a PDF digital signature.

public class PdfDigitalSignatureDetails


Name Description
PdfDigitalSignatureDetails(X509Certificate2, string, string, DateTime, PdfDigitalSignatureHashAlgorithm) Initializes a new instance of the PdfDigitalSignatureDetails class.


Name Description
Certificate { get; set; } Gets or sets the certificate to sign with.
HashAlgorithm { get; set; } Gets or sets the hash algorithm.
Location { get; set; } Gets or sets the location of signing.
Reason { get; set; } Gets or sets the reason of signing.
SignatureDate { get; set; } Gets or sets the date of signing.


At the moment digitally signing PDF documents is only available on .NET 2.0 or higher.


Shows how to work with PDF digital signature details.

var project = new Project(DataDir + "CreateProject2.mpp");

var options = new PdfSaveOptions();

var certificate = new X509Certificate2();

// create PDF signature details
var signatureDetails = new PdfDigitalSignatureDetails(
    // specify certificate
    // specify a reason of signing
    // specify a location of signing
    // specify a date of signing
    new DateTime(2019, 1, 1), 
    // specify a hash algorithm of signing

Console.WriteLine("Certificate: " + signatureDetails.Certificate);
Console.WriteLine("Reason: " + signatureDetails.Reason);
Console.WriteLine("Location: " + signatureDetails.Location);
Console.WriteLine("Signature Date: " + signatureDetails.SignatureDate);
Console.WriteLine("Hash Algorithm: " + signatureDetails.HashAlgorithm);

// set digital signature details
options.DigitalSignatureDetails = signatureDetails;

// save the project with specified encryption details
project.Save(OutDir + "WorkWithPdfEncryptionDetails_out.pdf", options);

See Also