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

    Show / Hide Table of Contents

    PdfToggleButtonField Class

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

    Represents a base class for button fields that can switch states, such as PdfCheckBoxField and PdfRadioButtonField.

    • C#
    • VB.NET
    public abstract class PdfToggleButtonField : PdfField
    Public MustInherit Class PdfToggleButtonField
        Inherits PdfField
    Inheritance:
    Object
    PdfObject
    PdfAnnotation
    PdfField
    PdfToggleButtonField
    Derived
    PdfCheckBoxField
    PdfRadioButtonField

    Properties

    Appearance

    Gets the appearance settings for this PdfToggleButtonField.

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

    The appearance settings for this PdfToggleButtonField.

    Checked

    Gets or sets a value indicating whether this PdfToggleButtonField is checked.

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

    true if this PdfToggleButtonField is checked; otherwise, false.

    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
    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'

    Value

    Gets or sets the PdfToggleButtonField value as an instance of the String type.

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

    The PdfToggleButtonField value as an instance of the String type.

    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)

    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)

    FieldType

    Gets the type of this field.

    (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(Double, Double)

    Sets the size of the Bounds.

    (Inherited from PdfAnnotation)

    SetBounds(Double, Double, Double, Double)

    Sets the Bounds.

    (Inherited from PdfAnnotation)

    ToString()

    Returns a String that represents this PdfField instance.

    (Inherited from PdfField)

    Extension Methods

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

    Examples

    Fill in Form example

    See Also

    PDF Specification ISO 32000-1:2008, section '12.7.4.2 Button Fields'
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.