ShapeSignatureLine Property

Gets SignatureLine object if the shape is a signature line. Returns null otherwise.

Namespace:  Aspose.Words.Drawing
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.4
public SignatureLine SignatureLine { get; }

Property Value

Type: SignatureLine
You can insert new SignatureLines into the document using InsertSignatureLine(SignatureLineOptions) and
Shows how to create a line for a signature and insert it into a document.
// Create a blank document and its DocumentBuilder
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

// The SignatureLineOptions will contain all the data that the signature line will display
SignatureLineOptions options = new SignatureLineOptions
    AllowComments = true,
    DefaultInstructions = true,
    Email = "",
    Instructions = "Please sign here",
    ShowDate = true,
    Signer = "John Doe",
    SignerTitle = "Senior Manager"

// Insert the signature line, applying our SignatureLineOptions
// We can control where the signature line will appear on the page using a combination of left/top indents and margin-relative positions
// Since we're placing the signature line at the bottom right of the page, we will need to use negative indents to move it into view 
Shape shape = builder.InsertSignatureLine(options, RelativeHorizontalPosition.RightMargin, -170.0, RelativeVerticalPosition.BottomMargin, -60.0, WrapType.None);

// The SignatureLine object is a member of the shape that contains it
SignatureLine signatureLine = shape.SignatureLine;

Assert.AreEqual("", signatureLine.Email);
Assert.AreEqual("John Doe", signatureLine.Signer);
Assert.AreEqual("Senior Manager", signatureLine.SignerTitle);
Assert.AreEqual("Please sign here", signatureLine.Instructions);


// We will be prompted to sign it when we open the document

// The object may be valid, but the signature itself isn't until it is signed

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