GemBox.Pdf
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    PdfTextField Class

    Namespace:
    GemBox.Pdf.Forms
    Assembly:
    GemBox.Pdf.dll

    Represents a box or space for text fill-in data typically entered from a keyboard.

    • C#
    • VB.NET
    public sealed class PdfTextField : PdfVariableTextField
    Public NotInheritable Class PdfTextField
        Inherits PdfVariableTextField
    Inheritance:
    System.Object
    PdfObject
    PdfAnnotation
    PdfField
    PdfVariableTextField
    PdfTextField

    Properties

    AllowRichTextFormat

    (PDF 1.5) Gets a value indicating whether the value of this field shall be a rich text string.

    Default value: false.

    • C#
    • VB.NET
    public bool AllowRichTextFormat { get; set; }
    Public Property AllowRichTextFormat As Boolean
    Property Value
    System.Boolean

    true if the value of this field shall be a rich text string; otherwise, false.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.7.4.3 Text Fields'

    CheckSpelling

    (PDF 1.4) Gets a value indicating whether the text entered in the field shall be spell-checked.

    Default value: true.

    • C#
    • VB.NET
    public bool CheckSpelling { get; set; }
    Public Property CheckSpelling As Boolean
    Property Value
    System.Boolean

    true if the text entered in the field shall be spell-checked; otherwise, false.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.7.4.3 Text Fields'

    CombOfCharacters

    (PDF 1.5) Gets the number of equally spaced positions the field shall be automatically divided into.

    Default value: null.

    • C#
    • VB.NET
    public int? CombOfCharacters { get; set; }
    Public Property CombOfCharacters As Integer?
    Property Value
    System.Nullable<System.Int32>

    The number of equally spaced positions the field shall be automatically divided into.

    Exceptions
    System.InvalidOperationException

    May be set only if the MultiLine, Password, and UsedForFileSelection properties are set to false.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.7.4.3 Text Fields'

    FieldType

    Gets the Text value.

    • C#
    • VB.NET
    public override PdfFieldType FieldType { get; }
    Public Overrides ReadOnly Property FieldType As PdfFieldType
    Property Value
    PdfFieldType

    The Text value.

    Overrides
    PdfField.FieldType

    LimitOfCharacters

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

    Default value: null.

    • C#
    • VB.NET
    public int? LimitOfCharacters { get; set; }
    Public Property LimitOfCharacters As Integer?
    Property Value
    System.Nullable<System.Int32>

    The maximum length of the field’s text, in characters.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.7.4.3 Text Fields'

    MultiLine

    Gets a value indicating whether the field may contain multiple lines of text.

    Default value: false.

    • C#
    • VB.NET
    public bool MultiLine { get; set; }
    Public Property MultiLine As Boolean
    Property Value
    System.Boolean

    true if the field may contain multiple lines of text; otherwise, false.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.7.4.3 Text Fields'

    Password

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

    Default value: false.

    • C#
    • VB.NET
    public bool Password { get; set; }
    Public Property Password As Boolean
    Property Value
    System.Boolean

    true if the field is intended for entering a secure password that should not be echoed visibly to the screen; otherwise, false.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.7.4.3 Text Fields'

    Required

    If set, the field shall have a value at the time it is exported by a submit-form action (see 12.7.5.2, "Submit-Form Action").

    • C#
    • VB.NET
    public bool Required { get; set; }
    Public Property Required As Boolean
    Property Value
    System.Boolean

    If set, the field shall have a value at the time it is exported by a submit-form action.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.7.3 Field Dictionaries'

    ScrollLongText

    (PDF 1.4) Gets a value indicating whether the field shall scroll to accommodate more text than fits within its rectangle.

    Default value: true.

    • C#
    • VB.NET
    public bool ScrollLongText { get; set; }
    Public Property ScrollLongText As Boolean
    Property Value
    System.Boolean

    true if the field shall scroll to accommodate more text than fits within its rectangle; otherwise, false.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.7.4.3 Text Fields'

    UsedForFileSelection

    (PDF 1.4) Gets a value indicating whether the text entered in the field represents the pathname of a file whose contents shall be submitted as the value of the field.

    Default value: false.

    • C#
    • VB.NET
    public bool UsedForFileSelection { get; set; }
    Public Property UsedForFileSelection As Boolean
    Property Value
    System.Boolean

    true if the text entered in the field represents the pathname of a file whose contents shall be submitted as the value of the field; otherwise, false.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.7.4.3 Text Fields'

    Value

    Gets or sets the PdfTextField value as an instance of a System.String.

    • C#
    • VB.NET
    public string Value { get; set; }
    Public Property Value As String
    Property Value
    System.String

    The PdfTextField value as an instance of a System.String.

    Inherited Properties

    Actions

    (Optional; PDF 1.1) An action that shall be performed when the field's annotation is activated (see 12.6, "Actions").

    (Inherited from PdfField)

    AnnotationType

    Gets the Widget value.

    (Inherited from PdfField)

    Appearance

    Gets the appearance settings for this PdfVariableTextField.

    (Inherited from PdfVariableTextField)

    AssociatedFiles

    (Optional; PDF 2.0) An array of one or more PdfFileSpecifications which denote the associated files for this PdfAnnotation.

    (Inherited from PdfAnnotation)

    Bounds

    (Required) The annotation bounds, defining the location and the size of the annotation on the page in default user space units.

    (Inherited from PdfAnnotation)

    DefaultValue

    (Optional; inheritable) The default value to which the field reverts when a reset-form action is executed. The format of this value is the same as that of Value.

    (Inherited from PdfField)

    Hidden

    (PDF 1.2) If set, do not display the annotation on the screen or allow it to interact with the user.

    The annotation may be printed (depending on the setting of the Print flag) but should be considered hidden for purposes of on-screen display and user interaction.

    (Inherited from PdfField)

    Locked

    (PDF 1.4) If set, do not allow the annotation to be deleted or its properties (including position and size) to be modified by the user. However, this flag does not restrict changes to the annotation's contents, such as the value of a form field.

    (Inherited from PdfAnnotation)

    Metadata

    (Optional; PDF 1.4) A metadata stream containing metadata for the component.

    (Inherited from PdfObject)

    Name

    Gets the (fully qualified) field name.

    (Inherited from PdfField)

    Page

    Gets the page with which this annotation is associated.

    (Inherited from PdfAnnotation)

    Print

    (PDF 1.2) If set, print the annotation when the page is printed. If clear, never print the annotation, regardless of whether it is displayed on the screen.

    note

    This can be useful for annotations representing interactive pushbuttons, which would serve no meaningful purpose on the printed page.

    (Inherited from PdfField)

    ReadOnly

    If set, the user may not change the value of the field. Any associated widget annotations will not interact with the user; that is, they will not respond to mouse clicks or change their appearance in response to mouse motions. This flag is useful for fields whose values are computed or imported from a database.

    (Inherited from PdfField)

    Tooltip

    (Optional; PDF 1.3) An alternate field name that shall be used in place of the actual field name wherever the field shall be identified in the user interface (such as in error or status messages referring to the field). This text is also useful when extracting the document's contents in support of accessibility to users with disabilities or for other purposes (see 14.9.3, "Alternate Descriptions").

    (Inherited from PdfField)

    Inherited Methods

    SetBounds(System.Double, System.Double)

    Sets the size of the Bounds.

    (Inherited from PdfAnnotation)

    SetBounds(System.Double, System.Double, System.Double, System.Double)

    Sets the Bounds.

    (Inherited from PdfAnnotation)

    ToString()

    Returns a System.String that represents this PdfField instance.

    (Inherited from PdfField)

    Extension Methods

    PdfObjectExtensions.GetDictionary(PdfObject)
    PdfObjectExtensions.GetOrAddDictionary(PdfObject)
    PdfObjectExtensions.GetArray(PdfObject)

    See Also

    PDF Specification ISO 32000-1:2008, section '12.7.4.3 Text Fields'
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.