TX Text Control .NET for WPF

SignatureFields Property

Property|Introduced in 31.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Specifies an array of DigitalSignature objects, each of which defines an X.509 certificate and is associated with a SignatureField in the document. These certificates can be used to digitally sign a PDF or a PDF/A file. For other formats this property has no meaning. To associate a certificate with a signature field a name must be specified for the field.

Syntax

public DigitalSignature[] SignatureFields { get; set; }

Examples

The following example signs a named PDF signature field with an X.509 certificate supplied by secure certificate-loading code.

SignatureField approval = new(new System.Drawing.Size(3000, 1000), "ApproverSignature", 10);
textControl.SignatureFields.Add(approval, FrameInsertionMode.AsCharacter);

DigitalSignature fieldSignature = new(certificate, null, "ApproverSignature");
SaveSettings saveSettings = new()
{
    SignatureFields = new[] { fieldSignature }
};
textControl.Save("signed-approval.pdf", StreamType.AdobePDF, saveSettings);