SignatureLineSettings Class
Represents the settings for creating a signature line in a Word document.
Inheritance
Namespace: Syncfusion.Office
Assembly: Syncfusion.Compression.Base.dll
Syntax
public class SignatureLineSettings : Object
Constructors
SignatureLineSettings()
Initializes a new instance of the SignatureLineSettings class.
Declaration
public SignatureLineSettings()
Examples
//Create a new Word document
WordDocument document = new WordDocument();
//Add a section into the word document
IWSection section = document.AddSection();
//Add a paragraph into the section
IWParagraph paragraph = section.AddParagraph();
//Create signature line settings and configure every property
SignatureLineSettings settings = new SignatureLineSettings();
settings.Signer = "John Smith";
settings.SignerTitle = "Manager";
settings.Instructions = "Please sign here";
settings.Email = "[email protected]";
IWPicture picture = paragraph.AppendSignatureLine(settings, 192, 96);
Console.WriteLine(((WPicture)picture).SignatureLine.Signer);
document.Save(@"C:\Data\SampleDocument.docx", FormatType.Docx);
document.Close();
Properties
AllowComments
Gets or sets a value indicating whether the signer can add comments in the Sign dialog.
Declaration
public bool AllowComments { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
Examples
//Create a new Word document
WordDocument document = new WordDocument();
//Add a section into the word document
IWSection section = document.AddSection();
//Add a paragraph into the section
IWParagraph paragraph = section.AddParagraph();
//Configure signature line settings and allow comments
SignatureLineSettings settings = new SignatureLineSettings();
settings.AllowComments = true;
IWPicture picture = paragraph.AppendSignatureLine(settings, 192, 96);
Console.WriteLine(((WPicture)picture).SignatureLine.AllowComments);
document.Save(@"C:\Data\SampleDocument.docx", FormatType.Docx);
document.Close();
DefaultInstructions
Gets or sets a value indicating whether default instructions are shown in the Sign dialog.
Declaration
public bool DefaultInstructions { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
Remarks
This property is ignored if Instructions is set.
Examples
//Create a new Word document
WordDocument document = new WordDocument();
//Add a section into the word document
IWSection section = document.AddSection();
//Add a paragraph into the section
IWParagraph paragraph = section.AddParagraph();
//Configure signature line settings and disable default instructions
SignatureLineSettings settings = new SignatureLineSettings();
settings.DefaultInstructions = false;
settings.Instructions = "Custom signing instructions";
IWPicture picture = paragraph.AppendSignatureLine(settings, 192, 96);
Console.WriteLine(((WPicture)picture).SignatureLine.DefaultInstructions);
document.Save(@"C:\Data\SampleDocument.docx", FormatType.Docx);
document.Close();
Gets or sets the suggested signer's e-mail address.
Declaration
public string Email { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The string that represents the e-mail address. The default value is an empty string. |
Examples
//Create a new Word document
WordDocument document = new WordDocument();
//Add a section into the word document
IWSection section = document.AddSection();
//Add a paragraph into the section
IWParagraph paragraph = section.AddParagraph();
//Configure signature line settings with the suggested signer e-mail
SignatureLineSettings settings = new SignatureLineSettings();
settings.Email = "[email protected]";
IWPicture picture = paragraph.AppendSignatureLine(settings, 192, 96);
Console.WriteLine(((WPicture)picture).SignatureLine.Email);
document.Save(@"C:\Data\SampleDocument.docx", FormatType.Docx);
document.Close();
Instructions
Gets or sets the instructions for the signature line.
Declaration
public string Instructions { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The string that represents the instructions for the signer. |
Examples
//Create a new Word document
WordDocument document = new WordDocument();
//Add a section into the word document
IWSection section = document.AddSection();
//Add a paragraph into the section
IWParagraph paragraph = section.AddParagraph();
//Configure signature line settings and set the instructions
SignatureLineSettings settings = new SignatureLineSettings();
settings.Instructions = "Please sign here before submitting";
IWPicture picture = paragraph.AppendSignatureLine(settings, 192, 96);
Console.WriteLine(((WPicture)picture).SignatureLine.Instructions);
document.Save(@"C:\Data\SampleDocument.docx", FormatType.Docx);
document.Close();
ShowDate
Gets or sets a value indicating whether the sign date is shown in the signature line.
Declaration
public bool ShowDate { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
Examples
//Create a new Word document
WordDocument document = new WordDocument();
//Add a section into the word document
IWSection section = document.AddSection();
//Add a paragraph into the section
IWParagraph paragraph = section.AddParagraph();
//Configure signature line settings and hide the sign date
SignatureLineSettings settings = new SignatureLineSettings();
settings.ShowDate = false;
IWPicture picture = paragraph.AppendSignatureLine(settings, 192, 96);
Console.WriteLine(((WPicture)picture).SignatureLine.ShowDate);
document.Save(@"C:\Data\SampleDocument.docx", FormatType.Docx);
document.Close();
Signer
Gets or sets the suggested signer of the signature line.
Declaration
public string Signer { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The string that represents the signer name. The default value is an empty string. |
Examples
//Create a new Word document
WordDocument document = new WordDocument();
//Add a section into the word document
IWSection section = document.AddSection();
//Add a paragraph into the section
IWParagraph paragraph = section.AddParagraph();
//Configure signature line settings with a suggested signer name
SignatureLineSettings settings = new SignatureLineSettings();
settings.Signer = "John Smith";
IWPicture picture = paragraph.AppendSignatureLine(settings, 192, 96);
Console.WriteLine(((WPicture)picture).SignatureLine.Signer);
document.Save(@"C:\Data\SampleDocument.docx", FormatType.Docx);
document.Close();
SignerTitle
Gets or sets the suggested signer's title (for example, Manager).
Declaration
public string SignerTitle { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The string that represents the signer's title. The default value is an empty string. |
Examples
//Create a new Word document
WordDocument document = new WordDocument();
//Add a section into the word document
IWSection section = document.AddSection();
//Add a paragraph into the section
IWParagraph paragraph = section.AddParagraph();
//Configure signature line settings with a suggested signer title
SignatureLineSettings settings = new SignatureLineSettings();
settings.SignerTitle = "Manager";
IWPicture picture = paragraph.AppendSignatureLine(settings, 192, 96);
Console.WriteLine(((WPicture)picture).SignatureLine.SignerTitle);
document.Save(@"C:\Data\SampleDocument.docx", FormatType.Docx);
document.Close();