Class TextWidget
An object representing a Text Box used in a PDF Form.
Implements
Inherited Members
Namespace: pdftron.PDF.Annots
Assembly: PDFNet.dll
Syntax
public class TextWidget : Widget, IDisposable
Constructors
TextWidget(Annot)
Creates a Text Widget annotation and initialize it using given annotation object.
Declaration
public TextWidget(Annot ann)
Parameters
Type | Name | Description |
---|---|---|
Annot | ann | The annotation object to use. |
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 |
TextWidget(Obj)
Creates a Text Widget annotation and initialize it using given Cos/SDF object.
Declaration
public TextWidget(Obj d)
Parameters
Type | Name | Description |
---|---|---|
Obj | d | The object to use to initialize the Text Widget |
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 Text Widget annotation, in the specified document.
Declaration
public static TextWidget Create(PDFDoc doc, Rect pos)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | doc | The document to which the annotation is added. |
Rect | pos | A rectangle specifying the annotation's bounds, specified in user space coordinates. |
Returns
Type | Description |
---|---|
TextWidget | A newly created blank Text Widget annotation. |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
Create(PDFDoc, Rect, string)
Creates a new Text Widget annotation, in the specified document.
Declaration
public static TextWidget Create(PDFDoc doc, Rect pos, string field_name)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | doc | The document to which the annotation is added. |
Rect | pos | A rectangle specifying the annotation's bounds, specified in user space coordinates. |
string | field_name | The name of the field for which to create a Text widget. |
Returns
Type | Description |
---|---|
TextWidget | A newly created blank Text Widget annotation. |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
Create(PDFDoc, Rect, Field)
Creates a new Text Widget annotation, in the specified document.
Declaration
public static TextWidget Create(PDFDoc doc, Rect pos, Field field)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | doc | The document to which the annotation is added. |
Rect | pos | A rectangle specifying the annotation's bounds, specified in user space coordinates. |
Field | field | the field for which to create a Text Widget. |
Returns
Type | Description |
---|---|
TextWidget | A newly created blank Widget annotation. |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
Dispose(bool)
Declaration
[HandleProcessCorruptedStateExceptions]
protected override void Dispose(bool A_0)
Parameters
Type | Name | Description |
---|---|---|
bool | A_0 |
Overrides
~TextWidget()
Declaration
protected ~TextWidget()
GetText()
Retrieves the text content of the Text Widget.
Declaration
public string GetText()
Returns
Type | Description |
---|---|
string | The Text Widget contents |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
SetText(string)
Sets the text content of the Text Widget.
Declaration
public void SetText(string text)
Parameters
Type | Name | Description |
---|---|---|
string | text | The text to be displayed in the Text Widget. |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |