Class PdfSignatureField
- Namespace
- Syncfusion.Pdf.Interactive
- Assembly
- Syncfusion.Pdf.Portable.dll
Represents signature field in the PDF Form.
public class PdfSignatureField : PdfSignatureAppearanceField, INotifyPropertyChanged
- Inheritance
-
PdfSignatureField
- Implements
- Inherited Members
Examples
//Create a new PDf document
PdfDocument document = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = document.Pages.Add();
//Create signature field
PdfSignatureField sign = new PdfSignatureField(page, "sign1");
sign.Bounds = new RectangleF(100, 420, 100, 50);
document.Form.Fields.Add(sign);
document.Save("Form.pdf");
document.Close(true);
'Create a new PDf document
Dim document As PdfDocument = New PdfDocument()
'Create a page
Dim page As PdfPage = document.Pages.Add()
'Create signature field
Dim sign As PdfSignatureField = New PdfSignatureField(page, "sign1")
sign.Bounds = New RectangleF(100, 420, 100, 50)
document.Form.Fields.Add(sign)
document.Save("Form.pdf")
document.Close(True)
Remarks
Please refer the UG docuemntation link
Constructors
PdfSignatureField(PdfPageBase, string)
Initializes a new instance of the PdfSignatureField class with the specific page and name.
public PdfSignatureField(PdfPageBase page, string name)
Parameters
page
PdfPageBasePage which the field to be placed on.
name
stringThe name of the field.
Examples
//Create a new PDf document
PdfDocument document = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = document.Pages.Add();
//Create signature field
PdfSignatureField sign = new PdfSignatureField(page, "sign1");
sign.Bounds = new RectangleF(100, 420, 100, 50);
document.Form.Fields.Add(sign);
document.Save("Form.pdf");
'Create a new PDf document
Dim document As PdfDocument = New PdfDocument()
'Create a page
Dim page As PdfPage = document.Pages.Add()
'Create signature field
Dim sign As PdfSignatureField = New PdfSignatureField(page, "sign1")
sign.Bounds = New RectangleF(100, 420, 100, 50)
document.Form.Fields.Add(sign)
document.Save("Form.pdf")
- See Also
Properties
Appearance
Gets the visual appearance of this field.[Read-Only]
public PdfAppearance Appearance { get; }
Property Value
Examples
//Create a new PDf document
PdfDocument document = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = document.Pages.Add();
//Create signature field
PdfSignatureField sign = new PdfSignatureField(page, "sign1");
sign.Bounds = new RectangleF(100, 420, 100, 50);
// Gets the signature appearance
PdfAppearance appearance = sign.Appearance;
document.Form.Fields.Add(sign);
document.Save("Form.pdf");
'Create a new PDf document
Dim document As PdfDocument = New PdfDocument()
'Create a page
Dim page As PdfPage = document.Pages.Add()
'Create signature field
Dim sign As PdfSignatureField = New PdfSignatureField(page, "sign1")
' Gets the signature appearance
Dim appearance As PdfAppearance = sign.Appearance
sign.Bounds = New RectangleF(100, 420, 100, 50)
document.Form.Fields.Add(sign)
document.Save("Form.pdf")
- See Also
Signature
Gets or sets the digital signature for signing the field.
public PdfSignature Signature { get; set; }
Property Value
Examples
//Create a new PDf document
PdfDocument document = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = document.Pages.Add();
//Create signature field
PdfSignatureField sign = new PdfSignatureField(page, "sign1");
sign.Signature = new PdfSignature(page, new PdfCertificate("PDF.pfx", "Syncfusion"), "Signature");
sign.Bounds = new RectangleF(100, 420, 100, 50);
// Gets the signature appearance
PdfAppearance appearance = sign.Appearance;
document.Form.Fields.Add(sign);
document.Save("Form.pdf");
'Create a new PDf document
Dim document As PdfDocument = New PdfDocument()
'Create a page
Dim page As PdfPage = document.Pages.Add()
'Create signature field
Dim sign As PdfSignatureField = New PdfSignatureField(page, "sign1")
sign.Signature = New PdfSignature(page, New PdfCertificate("PDF.pfx", "Syncfusion"), "Signature")
sign.Bounds = New RectangleF(100, 420, 100, 50)
document.Form.Fields.Add(sign)
document.Save("Form.pdf")
- See Also
Methods
DrawAppearance(PdfTemplate)
Draws the appearance.
protected override void DrawAppearance(PdfTemplate template)
Parameters
template
PdfTemplateThe template.
- See Also
Initialize()
Initializes an instance.
protected override void Initialize()
- See Also