Class SignatureWidget
An object representing a Signature used in a PDF Form. These Widgets can be signed directly, or signed using a DigitalSignatureField.
Implements
Inherited Members
Namespace: pdftron.PDF.Annots
Assembly: PDFTronDotNet.dll
Syntax
public class SignatureWidget : Widget, IDisposable
Constructors
SignatureWidget(Annot)
Creates a SignatureWidget annotation and initialize it using given annotation object.
Declaration
public SignatureWidget(Annot ann)
Parameters
| Type | Name | Description |
|---|---|---|
| Annot | ann | The input annotation |
Remarks
The constructor does not copy any data, but is instead the logical equivalent of a type cast.
Exceptions
| Type | Condition |
|---|---|
| PDFNetException | PDFNetException the PDFNet exception |
SignatureWidget(Obj)
Creates a SignatureWidget annotation and initializes it using given Cos/SDF object.
Declaration
public SignatureWidget(Obj d)
Parameters
| Type | Name | Description |
|---|---|---|
| Obj | d | the object to use to initialize the SignatureWidget |
Remarks
The constructor does not copy any data, but is instead the logical equivalent of a type cast.
Methods
Create(PDFDoc, Rect)
Creates a new SignatureWidget annotation in the specified document, and adds an associated signature form field to the document with a default Field name.
Declaration
public static SignatureWidget Create(PDFDoc doc, Rect pos)
Parameters
| Type | Name | Description |
|---|---|---|
| PDFDoc | doc | The document to which the widget is to be added. |
| Rect | pos | A rectangle specifying the widget's bounds in default user space units. |
Returns
| Type | Description |
|---|---|
| SignatureWidget | A newly-created blank SignatureWidget annotation. |
Exceptions
| Type | Condition |
|---|---|
| PDFNetException | PDFNetException the PDFNet exception |
Create(PDFDoc, Rect, string)
Creates a new SignatureWidget annotation in the specified document, and adds a signature form field to the document.
Declaration
public static SignatureWidget Create(PDFDoc doc, Rect pos, string field_name)
Parameters
| Type | Name | Description |
|---|---|---|
| PDFDoc | doc | The document to which the widget is to be added. |
| Rect | pos | A rectangle specifying the widget's bounds in default user space units. |
| string | field_name | The name of the digital signature field to create. |
Returns
| Type | Description |
|---|---|
| SignatureWidget | A newly-created blank SignatureWidget annotation. |
Exceptions
| Type | Condition |
|---|---|
| PDFNetException | PDFNetException the PDFNet exception |
Create(PDFDoc, Rect, DigitalSignatureField)
Creates a new SignatureWidget annotation associated with a particular DigitalSignatureField object (representing a signature-type form field) in the specified document.
Declaration
public static SignatureWidget Create(PDFDoc doc, Rect pos, DigitalSignatureField field)
Parameters
| Type | Name | Description |
|---|---|---|
| PDFDoc | doc | The document to which the widget is to be added. |
| Rect | pos | A rectangle specifying the widget's bounds in default user space units. |
| DigitalSignatureField | field | The digital signature field for which to create a signature widget. |
Returns
| Type | Description |
|---|---|
| SignatureWidget | A newly-created blank SignatureWidget annotation. |
Exceptions
| Type | Condition |
|---|---|
| PDFNetException | PDFNetException the PDFNet exception |
Create(PDFDoc, Rect, Field)
Creates a new SignatureWidget annotation associated with a particular form field in the specified document.
Declaration
public static SignatureWidget Create(PDFDoc doc, Rect pos, Field field)
Parameters
| Type | Name | Description |
|---|---|---|
| PDFDoc | doc | The document to which the widget is to be added. |
| Rect | pos | A rectangle specifying the widget's bounds in default user space units. |
| Field | field | The digital signature field for which to create a signature widget. |
Returns
| Type | Description |
|---|---|
| SignatureWidget | A newly-created blank SignatureWidget annotation. |
Exceptions
| Type | Condition |
|---|---|
| PDFNetException | PDFNetException the PDFNet exception |
CreateSignatureAppearance(Image)
A function that will create and add an appearance to this widget by centering an image within it.
Declaration
public void CreateSignatureAppearance(Image img)
Parameters
| Type | Name | Description |
|---|---|---|
| Image | img | An Image object representing the image to use. |
GetDigitalSignatureField()
Retrieves the DigitalSignatureField associated with this SignatureWidget.
Declaration
public DigitalSignatureField GetDigitalSignatureField()
Returns
| Type | Description |
|---|---|
| DigitalSignatureField | A DigitalSignatureField object representing the digital signature form field associated with this signature widget annotation. |