DocumentBuilderInsertSignatureLine Method (SignatureLineOptions)
Inserts a signature line at the current position.

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.12
public Shape InsertSignatureLine(
	SignatureLineOptions signatureLineOptions


Type: Aspose.WordsSignatureLineOptions
The object that stores parameters of creating signature line.

Return Value

Type: Shape
The signature line node that was just inserted.
Shows how to sign document with personal certificate and specific signatire line.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

SignatureLineOptions signatureLineOptions = new SignatureLineOptions
    Signer = "vderyushev",
    SignerTitle = "QA",
    Email = "",
    ShowDate = true,
    DefaultInstructions = false,
    Instructions = "You need more info about signature line",
    AllowComments = true

SignatureLine signatureLine = builder.InsertSignatureLine(signatureLineOptions).SignatureLine;
signatureLine.ProviderId = Guid.Parse("CF5A7BB4-8F3C-4756-9DF6-BEF7F13259A2");

doc.Save(ArtifactsDir + "DocumentBuilder.SignatureLineProviderId In.docx");

SignOptions signOptions = new SignOptions();
signOptions.SignatureLineId = signatureLine.Id;
signOptions.ProviderId = signatureLine.ProviderId;
signOptions.Comments = "Document was signed by vderyushev";
signOptions.SignTime = DateTime.Now;

CertificateHolder certHolder = CertificateHolder.Create(MyDir + "morzal.pfx", "aw");

DigitalSignatureUtil.Sign(ArtifactsDir + "DocumentBuilder.SignatureLineProviderId In.docx", ArtifactsDir + "DocumentBuilder.SignatureLineProviderId Out.docx", certHolder, signOptions);
See Also