.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

PdfTimeStamp Class

Allows you to generate document-level timestamps.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Pdf.v21.2.Core.dll

Declaration

public class PdfTimeStamp :
    IExternalSigner

Remarks

The PdfTimeStamp is the default IExternalSigner interface implementation. Use this class to generate document-level timestamps.

The TsaClient class allows you to specify the timestamp client. You can create an ITsaClient implementation to use your own timestamp client.

The code sample below creates a document-level timestamp and applies it to a signature form field:

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

using (var signer = new PdfDocumentSigner("Document.pdf"))
{
    // Create a timestamp:
    ITsaClient tsaClient = new TsaClient(new Uri(@"https://freetsa.org/tsr"), HashAlgorithmType.SHA256);

    // Create a new signature form field:
    var signatureFieldInfo1 = new PdfSignatureFieldInfo(1);
    signatureFieldInfo1.Name = "SignatureField1";
    signatureFieldInfo1.SignatureBounds = new PdfRectangle(200, 200, 250, 250);

    // Create a document-level timestamp:
    PdfTimeStamp pdfTimeStamp = new PdfTimeStamp(tsaClient);

    // Apply this timestamp to the form field:
    var timeStampSignature = new PdfSignatureBuilder(pdfTimeStamp, signatureFieldInfo1);

    // Sign and save the document:
    signer.SaveDocument("SignedDocument.pdf", timeStampSignature);
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the PdfTimeStamp class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

Implements

Inheritance

Object
PdfTimeStamp
See Also