PdfTimeStamp Class
Allows you to generate document-level timestamps.
Namespace: DevExpress.Pdf
Assembly: DevExpress.Pdf.v20.2.Core.dll
NuGet Package: DevExpress.Pdf.Core
NuGet Packages: DevExpress.Pdf.Core, DevExpress.WindowsDesktop.Pdf.Core
Declaration
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 time stamp:
PdfTimeStamp pdfTimeStamp = new PdfTimeStamp(tsaClient);
// Apply this time stamp to the form field:
var timeStampSignature = new PdfSignatureBuilder(pdfTimeStamp, signatureFieldInfo1);
// Sign and save the document:
signer.SaveDocument("SignedDocument.pdf", timeStampSignature);
}
Implements
Inheritance
Object
PdfTimeStamp
See Also