All docs
V20.2
21.1 (EAP/Beta)
20.2
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

PdfDocumentSigner Class

A helper class used to apply signatures to PDF documents.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Docs.v20.2.dll

Declaration

public class PdfDocumentSigner :
    IDisposable

Remarks

Use the PdfDocumentSigner instance to apply signatures to new or existing signature fields. Call the PdfDocumentSigner.SaveDocument method to sign and save the PDF document.

The PdfSignatureBuilder class represents signatures. The PDF Document API supports PKCS#7 signatures. You can use the Pkcs7Signer class to provide PKCS#7 signatures. Create a Pkcs7SignerBase descendant to use a custom object to create the PKCS#7 signature.

The code sample below shows how to sign an existing signature field:

using DevExpress.Pdf;
using DevExpress.Office.DigitalSignatures;
using DevExpress.Office.Tsp;

using (var signer = new PdfDocumentSigner("Document.pdf"))
{
    ITsaClient tsaClient = new TsaClient(new Uri(@"http://timestamp.apple.com/ts01"), HashAlgorithmType.SHA256);
    var signatureBuilder = new PdfSignatureBuilder(new Pkcs7Signer("Signing Documents//testcert.pfx", "123", HashAlgorithmType.SHA256, tsaClient),
            "Sign");
    signatureBuilder.SetImageData(System.IO.File.ReadAllBytes("Signing Documents//Jane Cooper.jpg"));
    signatureBuilder.Location = "USA";

    signer.SaveDocument("out2.pdf", signatureBuilder);
}

Inheritance

Object
PdfDocumentSigner
See Also