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

    Show / Hide Table of Contents

    PdfField Class

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

    Represents a base class for all fields in an interactive form.

    • C#
    • VB.NET
    public abstract class PdfField : PdfAnnotation
    Public MustInherit Class PdfField
        Inherits PdfAnnotation
    Inheritance:
    System.Object
    PdfObject
    PdfAnnotation
    PdfField
    Derived
    PdfButtonField
    PdfSignatureField
    PdfToggleButtonField
    PdfVariableTextField

    Properties

    Actions

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

    • C#
    • VB.NET
    public PdfFieldActionCollection Actions { get; }
    Public ReadOnly Property Actions As PdfFieldActionCollection
    Property Value
    PdfFieldActionCollection

    An action that shall be performed when the field's annotation is activated.

    AnnotationType

    Gets the Widget value.

    • C#
    • VB.NET
    public sealed override PdfAnnotationType AnnotationType { get; }
    Public NotOverridable Overrides ReadOnly Property AnnotationType As PdfAnnotationType
    Property Value
    PdfAnnotationType

    The Widget value.

    Overrides
    PdfAnnotation.AnnotationType

    Appearance

    Gets the appearance settings for this PdfField.

    • C#
    • VB.NET
    public PdfFieldAppearance Appearance { get; }
    Public ReadOnly Property Appearance As PdfFieldAppearance
    Property Value
    PdfFieldAppearance

    The appearance settings for this PdfField.

    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.

    • C#
    • VB.NET
    public object DefaultValue { get; set; }
    Public Property DefaultValue As Object
    Property Value
    System.Object

    The default value to which the field reverts when a reset-form action is executed.

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

    FieldType

    Gets the type of this field.

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

    The type of this field.

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

    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.

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

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

    See Also
    PDF Specification ISO 32000-1:2008, section '12.5.3 Annotation Flags'

    Name

    Gets the (fully qualified) field name.

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

    The (fully qualified) field name.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.7.3.2 Field Names'

    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.

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

    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.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.5.3 Annotation Flags'

    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.

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

    If set, the user may not change the value of the field.

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

    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").

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

    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.

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

    Value

    (Optional; inheritable) The field’s value, whose format varies depending on the field type. See the descriptions of individual field types for further information.

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

    The field’s value, whose format varies depending on the field type.

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

    Methods

    ToString()

    Returns a System.String that represents this PdfField instance.

    • C#
    • VB.NET
    public override string ToString()
    Public Overrides Function ToString As String
    Returns
    System.String

    A System.String that represents this PdfField instance.

    Overrides
    System.Object.ToString()
    Remarks

    This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).

    Inherited Properties

    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)

    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)

    Page

    Gets the page with which this annotation is associated.

    (Inherited from PdfAnnotation)

    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)

    Extension Methods

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

    Examples

    Read Form example
    Form Actions example

    See Also

    PDF Specification ISO 32000-1:2008, section '12.7 Interactive Forms'
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.