[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.AcroForms.TextField

TextField Class

Represents the text field.

Namespace: GrapeCity.Documents.Pdf.AcroForms
Assembly: DS.Documents.Pdf.dll
Syntax
public class TextField : Field, IPdfDict, IOwnedObject, ActionHide.ILinkedObject, ActionFieldsBase.IFieldDef
Public Class TextField
    Inherits Field
    Implements IPdfDict, IOwnedObject, ActionHide.ILinkedObject, ActionFieldsBase.IFieldDef

Constructors

Name Description
TextField()

Initializes a new instance of the TextField class.

Properties

Name Description
DefaultStyleString

Gets or sets the default style string used when the field value is specified using RichTextValue. See PDF specification for details.

Note that GcPdf does not automatically regenerates appearance streams for text fields containing RTF text.

DefaultValue

Gets or sets the default value of this TextField, applied when the field is reset.

MaxLen

Gets or sets the maximum length of the field’s text, in characters.

Multiline

Gets or sets a value indicating whether the field can contain multiple lines of text.

Password

Gets or sets a value indicating whether the field is intended for entering a secure password that should not be echoed visibly to the screen.

RichText

Gets or sets a value indicating whether the value of this field should be represented as a rich text string.

RichTextValue

Gets or sets the rich text to be displayed in the TextField. This text can be formatted using HTML tags, see PDF specification for details.

Note that GcPdf does not automatically regenerates appearance streams for text fields containing RTF text.

Scrollable

Gets or sets a value indicating whether the field is scrollable to accommodate more text than fits within its annotation rectangle.

SpellCheck

Gets or sets a value indicating whether the text entered in the field is spell-checked.

Value

Gets or sets the value of TextField.

Widget

Gets the WidgetAnnotation defining view properties of the text field.

Methods

Name Description
SetDateFormat(string)

Imposes the specified date format string on the current TextField.

The syntax of the format string is similar to .NET format strings. Some examples are "m/d/yyyy" or "d-mmm-yy".

Note that this method initializes the values of Field.Events.FormatValue and Field.Events.KeyPress only, it does not change the field's value or widget appearance streams.

SetDateValue(DateTime, string)

Imposes the specified date format string on the current TextField, and assigns to it the specified value as a date.

The syntax of the format string is similar to .NET format strings. Some examples are "m/d/yyyy" or "d-mmm-yy".

SetNumberFormat(int, NumberSeparatorStyle, NumberNegativeStyle, string, CurrencySymbolStyle)

Imposes the specified numeric formatting options on the current TextField.

Note that this method initializes the values of Field.Events.FormatValue and Field.Events.KeyPress only, it does not change the field's value or widget appearance streams.

SetNumberValue(double, int, NumberSeparatorStyle, NumberNegativeStyle, string, CurrencySymbolStyle)

Imposes the specified numeric formatting options on the current TextField, and assigns to it the specified value as a number.

SetPercentFormat(int, NumberSeparatorStyle)

Imposes the specified percentage formatting options on the current TextField.

Note that this method initializes the values of Field.Events.FormatValue and Field.Events.KeyPress only, it does not change the field's value or widget appearance streams.

SetPercentValue(double, int, NumberSeparatorStyle)

Imposes the specified percentage formatting options on the current TextField, and assigns to it the specified value as percentage.

SetSpecialFormat(SpecialFormat)

Imposes the specified special format on the current TextField.

Note that this method initializes the values of Field.Events.FormatValue and Field.Events.KeyPress only, it does not change the field's value or widget appearance streams.

SetSpecialFormatValue(string, SpecialFormat)

Sets the value of the current TextField as a value formatted according to format.

This method assumes that value is already formatted as required. E.g. if format is SSN, value should look like "123-45-6789".

SetTimeFormat(string)

Imposes the specified time format string on the current TextField.

The syntax of the format string is similar to .NET format strings. Some examples are "HH:MM" or "H:MM tt".

Note that this method initializes the values of Field.Events.FormatValue and Field.Events.KeyPress only, it does not change the field's value or widget appearance streams.

SetTimeValue(DateTime, string)

Imposes the specified time format string on the current TextField, and assigns to it the specified value as time.

The syntax of the format string is similar to .NET format strings. Some examples are "HH:MM" or "H:MM tt".

Extension Methods