SignatureLine

SignatureLine class

Provides access to signature line properties.

To learn more, visit the Work with Digital Signatures documentation article.

public class SignatureLine

Properties

NameDescription
AllowComments { get; set; }Gets or sets a value indicating that the signer can add comments in the Sign dialog. Default value for this property is false.
DefaultInstructions { get; set; }Gets or sets a value indicating that default instructions is shown in the Sign dialog. Default value for this property is true.
Email { get; set; }Gets or sets suggested signer’s e-mail address. Default value for this property is empty string (Empty).
Id { get; set; }Gets or sets identifier for this signature line.
Instructions { get; set; }Gets or sets instructions to the signer that are displayed on signing the signature line. This property is ignored if DefaultInstructions is set. Default value for this property is empty string (Empty).
IsSigned { get; }Indicates that signature line is signed by digital signature.
IsValid { get; }Indicates that signature line is signed by digital signature and this digital signature is valid.
ProviderId { get; set; }Gets or sets signature provider identifier for this signature line. Default value is “{00000000-0000-0000-0000-000000000000}”.
ShowDate { get; set; }Gets or sets a value indicating that sign date is shown in the signature line. Default value for this property is true.
Signer { get; set; }Gets or sets suggested signer of the signature line. Default value for this property is empty string (Empty).
SignerTitle { get; set; }Gets or sets suggested signer’s title (for example, Manager). Default value for this property is empty string (Empty).

Examples

Shows how to create a line for a signature and insert it into a document.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

SignatureLineOptions options = new SignatureLineOptions
{
    AllowComments = true,
    DefaultInstructions = true,
    Email = "john.doe@management.com",
    Instructions = "Please sign here",
    ShowDate = true,
    Signer = "John Doe",
    SignerTitle = "Senior Manager"
};

// Insert a shape that will contain a signature line, whose appearance we will
// customize using the "SignatureLineOptions" object we have created above.
// If we insert a shape whose coordinates originate at the bottom right hand corner of the page,
// we will need to supply negative x and y coordinates to bring the shape into view.
Shape shape = builder.InsertSignatureLine(options, RelativeHorizontalPosition.RightMargin, -170.0,
        RelativeVerticalPosition.BottomMargin, -60.0, WrapType.None);

Assert.True(shape.IsSignatureLine);

// Verify the properties of our signature line via its Shape object.
SignatureLine signatureLine = shape.SignatureLine;

Assert.AreEqual("john.doe@management.com", signatureLine.Email);
Assert.AreEqual("John Doe", signatureLine.Signer);
Assert.AreEqual("Senior Manager", signatureLine.SignerTitle);
Assert.AreEqual("Please sign here", signatureLine.Instructions);
Assert.True(signatureLine.ShowDate);
Assert.True(signatureLine.AllowComments);
Assert.True(signatureLine.DefaultInstructions);

doc.Save(ArtifactsDir + "Shape.SignatureLine.docx");

See Also