DigitalSignature Constructor
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Initializes a new instance of the DigitalSignature class.
Syntax
DigitalSignature(X509Certificate2, string)
Initializes a new instance of the DigitalSignature class specifying a certificate and a time server.
public DigitalSignature(X509Certificate2 x509, string timeServerURL);Public Sub New(x509 As X509Certificate2, timeServerURL As String)| Parameter | Description |
|---|---|
| x509 | Specifies an |
| timeServerURL | Specifies the URL of a time server which is used to get a time stamp for the certification. If an empty string is specified, the current date and time on the computer is used. |
DigitalSignature(X509Certificate2, string, string)
Initializes a new instance of the DigitalSignature class which is associated with a SignatureField.
public DigitalSignature(X509Certificate2 x509, string timeServerURL, string signatureFieldName);Public Sub New(x509 As X509Certificate2, timeServerURL As String, signatureFieldName As String)| Parameter | Description |
|---|---|
| x509 | Specifies an |
| timeServerURL | Specifies the URL of a time server which is used to get a time stamp for the certification. If an empty string is specified, the current date and time on the computer is used. |
| signatureFieldName | Specifies the name of a SignatureField contained in a document. The digital signature is associated with this field. The name can be specified with the signature field's constructor or its Name property. |
Examples
The following example creates a PDF signature from an X.509 certificate supplied by secure certificate-loading code.
DigitalSignature digitalSignature = new(certificate, null);
SaveSettings saveSettings = new() { DigitalSignature = digitalSignature };
textControl.Save("signed-report.pdf", StreamType.AdobePDF, saveSettings);Dim digitalSignature As New DigitalSignature(certificate, Nothing)
Dim saveSettings As New SaveSettings() With { .DigitalSignature = digitalSignature }
textControl.Save("signed-report.pdf", StreamType.AdobePDF, saveSettings)