## PoppplerFormField

PoppplerFormField — Form Field

## Functions

PopplerFormFieldType | poppler_form_field_get_field_type ()
gint | poppler_form_field_get_id ()
gboolean | poppler_form_field_is_read_only ()
gdouble | poppler_form_field_get_font_size ()
gchar * | poppler_form_field_get_partial_name ()
gchar * | poppler_form_field_get_mapping_name ()
gchar * | poppler_form_field_get_name ()
PopplerAction * | poppler_form_field_get_action ()
PopplerFormButtonType | poppler_form_field_button_get_button_type ()
gboolean | poppler_form_field_button_get_state ()
void | poppler_form_field_button_set_state ()
PopplerFormChoiceType | poppler_form_field_choice_get_choice_type ()
gboolean | poppler_form_field_choice_can_select_multiple ()
gboolean | poppler_form_field_choice_commit_on_change ()
gboolean | poppler_form_field_choice_do_spell_check ()
gchar * | poppler_form_field_choice_get_item ()
gint | poppler_form_field_choice_get_n_items ()
gchar * | poppler_form_field_choice_get_text ()
void | poppler_form_field_choice_set_text ()
gboolean | poppler_form_field_choice_is_editable ()
gboolean | poppler_form_field_choice_is_item_selected ()
void | poppler_form_field_choice_select_item ()
void | poppler_form_field_choice_toggle_item ()
void | poppler_form_field_choice_unselect_all ()
PopplerFormTextType | poppler_form_field_text_get_text_type ()
gchar * | poppler_form_field_text_get_text ()
void | poppler_form_field_text_set_text ()
gint | poppler_form_field_text_get_max_len ()
gboolean | poppler_form_field_text_do_scroll ()
gboolean | poppler_form_field_text_do_spell_check ()
gboolean | poppler_form_field_text_is_password ()
gboolean | poppler_form_field_text_is_rich_text ()

## Types and Values

| PopplerFormField
enum | PopplerFormFieldType
enum | PopplerFormButtonType
enum | PopplerFormChoiceType
enum | PopplerFormTextType

## Object Hierarchy

        GObject
        ╰── PopplerFormField

## Includes

    #include <poppler.h>

## Description

## Functions

### poppler_form_field_get_field_type ()

    PopplerFormFieldType
    poppler_form_field_get_field_type (PopplerFormField *field);

Gets the type of `field`

#### Parameters

field | a PopplerFormField |

#### Returns

PopplerFormFieldType of `field`

### poppler_form_field_get_id ()

    gint
    poppler_form_field_get_id (PopplerFormField *field);

Gets the id of `field`

#### Parameters

field | a PopplerFormField |

#### Returns

the id of `field`

### poppler_form_field_is_read_only ()

    gboolean
    poppler_form_field_is_read_only (PopplerFormField *field);

Checks whether `field` is read only

#### Parameters

field | a PopplerFormField |

#### Returns

`TRUE` if `field` is read only

### poppler_form_field_get_font_size ()

    gdouble
    poppler_form_field_get_font_size (PopplerFormField *field);

Gets the font size of `field`

#### Parameters

field | a PopplerFormField |

#### Returns

the font size of `field`

### poppler_form_field_get_partial_name ()

    gchar *
    poppler_form_field_get_partial_name (PopplerFormField *field);

Gets the partial name of `field` .

#### Parameters

field | a PopplerFormField |

#### Returns

a new allocated string. It must be freed with `g_free()` when done.

Since: 0.16

### poppler_form_field_get_mapping_name ()

    gchar *
    poppler_form_field_get_mapping_name (PopplerFormField *field);

Gets the mapping name of `field` that is used when exporting interactive form field data from the document

#### Parameters

field | a PopplerFormField |

#### Returns

a new allocated string. It must be freed with `g_free()` when done.

Since: 0.16

### poppler_form_field_get_name ()

    gchar *
    poppler_form_field_get_name (PopplerFormField *field);

Gets the fully qualified name of `field` . It's constructed by concatenating the partial field names of the field and all of its ancestors.

#### Parameters

field | a PopplerFormField |

#### Returns

a new allocated string. It must be freed with `g_free()` when done.

Since: 0.16

### poppler_form_field_get_action ()

    PopplerAction *
    poppler_form_field_get_action (PopplerFormField *field);

Retrieves the action (PopplerAction) that shall be performed when `field` is activated, or `NULL`

#### Parameters

field | a PopplerFormField |

#### Returns

the action to perform. The returned object is owned by `field` and should not be freed.

[transfer none]

Since: 0.18

### poppler_form_field_button_get_button_type ()

    PopplerFormButtonType
    poppler_form_field_button_get_button_type
                                   (PopplerFormField *field);

Gets the button type of `field`

#### Parameters

field | a PopplerFormField |

#### Returns

PopplerFormButtonType of `field`

### poppler_form_field_button_get_state ()

    gboolean
    poppler_form_field_button_get_state (PopplerFormField *field);

Queries a PopplerFormField and returns its current state. Returns `TRUE` if `field` is pressed in and `FALSE` if it is raised.

#### Parameters

field | a PopplerFormField |

#### Returns

current state of `field`

### poppler_form_field_button_set_state ()

    void
    poppler_form_field_button_set_state (PopplerFormField *field,
                                         gboolean state);

Sets the status of `field` . Set to `TRUE` if you want the PopplerFormField to be 'pressed in', and `FALSE` to raise it.

#### Parameters

field | a PopplerFormField |
state | `TRUE` or `FALSE` |

### poppler_form_field_choice_get_choice_type ()

    PopplerFormChoiceType
    poppler_form_field_choice_get_choice_type
                                   (PopplerFormField *field);

Gets the choice type of `field`

#### Parameters

field | a PopplerFormField |

#### Returns

PopplerFormChoiceType of `field`

### poppler_form_field_choice_can_select_multiple ()

    gboolean
    poppler_form_field_choice_can_select_multiple
                                   (PopplerFormField *field);

Checks whether `field` allows multiple choices to be selected

#### Parameters

field | a PopplerFormField |

#### Returns

`TRUE` if `field` allows multiple choices to be selected

### poppler_form_field_choice_commit_on_change ()

    gboolean
    poppler_form_field_choice_commit_on_change
                                   (PopplerFormField *field);

### poppler_form_field_choice_do_spell_check ()

    gboolean
    poppler_form_field_choice_do_spell_check
                                   (PopplerFormField *field);

Checks whether spell checking should be done for the contents of `field`

#### Parameters

field | a PopplerFormField |

#### Returns

`TRUE` if spell checking should be done for `field`

### poppler_form_field_choice_get_item ()

    gchar *
    poppler_form_field_choice_get_item (PopplerFormField *field,
                                        gint index);

Returns the contents of the item on `field` at the given index

#### Parameters

field | a PopplerFormField |
index | the index of the item |

#### Returns

a new allocated string. It must be freed with `g_free()` when done.

### poppler_form_field_choice_get_n_items ()

    gint
    poppler_form_field_choice_get_n_items (PopplerFormField *field);

Returns the number of items on `field`

#### Parameters

field | a PopplerFormField |

#### Returns

the number of items on `field`

### poppler_form_field_choice_get_text ()

    gchar *
    poppler_form_field_choice_get_text (PopplerFormField *field);

Retrieves the contents of `field` .

#### Parameters

field | a PopplerFormField |

#### Returns

a new allocated string. It must be freed with `g_free()` when done.

### poppler_form_field_choice_set_text ()

    void
    poppler_form_field_choice_set_text (PopplerFormField *field,
                                        const gchar *text);

Sets the text in `field` to the given value, replacing the current contents

#### Parameters

field | a PopplerFormField |
text | the new text |

### poppler_form_field_choice_is_editable ()

    gboolean
    poppler_form_field_choice_is_editable (PopplerFormField *field);

Checks whether `field` is editable

#### Parameters

field | a PopplerFormField |

#### Returns

`TRUE` if `field` is editable

### poppler_form_field_choice_is_item_selected ()

    gboolean
    poppler_form_field_choice_is_item_selected
                                   (PopplerFormField *field,
                                    gint index);

Checks whether the item at the given index on `field` is currently selected

#### Parameters

field | a PopplerFormField |
index | the index of the item |

#### Returns

`TRUE` if item at `index` is currently selected

### poppler_form_field_choice_select_item ()

    void
    poppler_form_field_choice_select_item (PopplerFormField *field,
                                           gint index);

Selects the item at the given index on `field`

#### Parameters

field | a PopplerFormField |
index | the index of the item |

### poppler_form_field_choice_toggle_item ()

    void
    poppler_form_field_choice_toggle_item (PopplerFormField *field,
                                           gint index);

Changes the state of the item at the given index

#### Parameters

field | a PopplerFormField |
index | the index of the item |

### poppler_form_field_choice_unselect_all ()

    void
    poppler_form_field_choice_unselect_all
                                   (PopplerFormField *field);

Unselects all the items on `field`

#### Parameters

field | a PopplerFormField |

### poppler_form_field_text_get_text_type ()

    PopplerFormTextType
    poppler_form_field_text_get_text_type (PopplerFormField *field);

Gets the text type of `field` .

#### Parameters

field | a PopplerFormField |

#### Returns

PopplerFormTextType of `field`

### poppler_form_field_text_get_text ()

    gchar *
    poppler_form_field_text_get_text (PopplerFormField *field);

Retrieves the contents of `field` .

#### Parameters

field | a PopplerFormField |

#### Returns

a new allocated string. It must be freed with `g_free()` when done.

### poppler_form_field_text_set_text ()

    void
    poppler_form_field_text_set_text (PopplerFormField *field,
                                      const gchar *text);

Sets the text in `field` to the given value, replacing the current contents.

#### Parameters

field | a PopplerFormField |
text | the new text |

### poppler_form_field_text_get_max_len ()

    gint
    poppler_form_field_text_get_max_len (PopplerFormField *field);

Retrieves the maximum allowed length of the text in `field`

#### Parameters

field | a PopplerFormField |

#### Returns

the maximum allowed number of characters in `field` , or -1 if there is no maximum.

### poppler_form_field_text_do_scroll ()

    gboolean
    poppler_form_field_text_do_scroll (PopplerFormField *field);

### poppler_form_field_text_do_spell_check ()

    gboolean
    poppler_form_field_text_do_spell_check
                                   (PopplerFormField *field);

Checks whether spell checking should be done for the contents of `field`

#### Parameters

field | a PopplerFormField |

#### Returns

`TRUE` if spell checking should be done for `field`

### poppler_form_field_text_is_password ()

    gboolean
    poppler_form_field_text_is_password (PopplerFormField *field);

Checks whether content of `field` is a password and it must be hidden

#### Parameters

field | a PopplerFormField |

#### Returns

`TRUE` if the content of `field` is a password

### poppler_form_field_text_is_rich_text ()

    gboolean
    poppler_form_field_text_is_rich_text (PopplerFormField *field);

Checks whether the contents of `field` are rich text

#### Parameters

field | a PopplerFormField |

#### Returns

`TRUE` if the contents of `field` are rich text

## Types and Values

### PopplerFormField

    typedef struct _PopplerFormField PopplerFormField;

### enum PopplerFormFieldType

#### Members

POPPLER_FORM_FIELD_UNKNOWN |  |
POPPLER_FORM_FIELD_BUTTON |  |
POPPLER_FORM_FIELD_TEXT |  |
POPPLER_FORM_FIELD_CHOICE |  |
POPPLER_FORM_FIELD_SIGNATURE |  |

### enum PopplerFormButtonType

#### Members

POPPLER_FORM_BUTTON_PUSH |  |
POPPLER_FORM_BUTTON_CHECK |  |
POPPLER_FORM_BUTTON_RADIO |  |

### enum PopplerFormChoiceType

#### Members

POPPLER_FORM_CHOICE_COMBO |  |
POPPLER_FORM_CHOICE_LIST |  |

### enum PopplerFormTextType

#### Members

POPPLER_FORM_TEXT_NORMAL |  |
POPPLER_FORM_TEXT_MULTILINE |  |
POPPLER_FORM_TEXT_FILE_SELECT |  |