Poppler.FormField

g GObject.Object GObject.Object Poppler.FormField Poppler.FormField GObject.Object->Poppler.FormField

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

button_get_button_type ()

button_get_state ()

button_set_state (state)

choice_can_select_multiple ()

choice_commit_on_change ()

choice_do_spell_check ()

choice_get_choice_type ()

choice_get_item (index)

choice_get_n_items ()

choice_get_text ()

choice_is_editable ()

choice_is_item_selected (index)

choice_select_item (index)

choice_set_text (text)

choice_toggle_item (index)

choice_unselect_all ()

get_action ()

get_additional_action (type)

get_alternate_ui_name ()

get_field_type ()

get_font_size ()

get_id ()

get_mapping_name ()

get_name ()

get_partial_name ()

is_read_only ()

signature_validate_async (flags, cancellable, callback, *user_data)

signature_validate_finish (result)

signature_validate_sync (flags, cancellable)

text_do_scroll ()

text_do_spell_check ()

text_get_max_len ()

text_get_text ()

text_get_text_type ()

text_is_password ()

text_is_rich_text ()

text_set_text (text)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Poppler.FormField(**kwargs)
Bases:

GObject.Object

Abstract:

No

button_get_button_type()
Returns:

Poppler.FormButtonType of self

Return type:

Poppler.FormButtonType

Gets the button type of self

button_get_state()
Returns:

current state of self

Return type:

bool

Queries a Poppler.FormField and returns its current state. Returns True if self is pressed in and False if it is raised.

button_set_state(state)
Parameters:

state (bool) – True or False

Sets the status of self. Set to True if you want the Poppler.FormField to be ‘pressed in’, and False to raise it.

choice_can_select_multiple()
Returns:

True if self allows multiple choices to be selected

Return type:

bool

Checks whether self allows multiple choices to be selected

choice_commit_on_change()
Return type:

bool

choice_do_spell_check()
Returns:

True if spell checking should be done for self

Return type:

bool

Checks whether spell checking should be done for the contents of self

choice_get_choice_type()
Returns:

Poppler.FormChoiceType of self

Return type:

Poppler.FormChoiceType

Gets the choice type of self

choice_get_item(index)
Parameters:

index (int) – the index of the item

Returns:

a new allocated string. It must be freed with GLib.free() when done.

Return type:

str

Returns the contents of the item on self at the given index

choice_get_n_items()
Returns:

the number of items on self

Return type:

int

Returns the number of items on self

choice_get_text()
Returns:

a new allocated string. It must be freed with GLib.free() when done.

Return type:

str

Retrieves the contents of self.

choice_is_editable()
Returns:

True if self is editable

Return type:

bool

Checks whether self is editable

choice_is_item_selected(index)
Parameters:

index (int) – the index of the item

Returns:

True if item at index is currently selected

Return type:

bool

Checks whether the item at the given index on self is currently selected

choice_select_item(index)
Parameters:

index (int) – the index of the item

Selects the item at the given index on self

choice_set_text(text)
Parameters:

text (str) – the new text

Sets the text in self to the given value, replacing the current contents

choice_toggle_item(index)
Parameters:

index (int) – the index of the item

Changes the state of the item at the given index

choice_unselect_all()

Unselects all the items on self

get_action()
Returns:

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

Return type:

Poppler.Action

Retrieves the action (Poppler.Action) that shall be performed when self is activated, or None

New in version 0.18.

get_additional_action(type)
Parameters:

type (Poppler.AdditionalActionType) – the type of additional action

Returns:

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

Return type:

Poppler.Action

Retrieves the action (Poppler.Action) that shall be performed when an additional action is triggered on self, or None.

New in version 0.72.

get_alternate_ui_name()
Returns:

a new allocated string. It must be freed with GLib.free() when done.

Return type:

str

Gets the alternate ui name of self. This name is also commonly used by pdf producers/readers to show it as a tooltip when self area is hovered by a pointing device (eg. mouse).

New in version 0.88.

get_field_type()
Returns:

Poppler.FormFieldType of self

Return type:

Poppler.FormFieldType

Gets the type of self

get_font_size()
Returns:

the font size of self

Return type:

float

Gets the font size of self

WARNING: This function always returns 0. Contact the poppler mailing list if you’re interested in implementing it properly

get_id()
Returns:

the id of self

Return type:

int

Gets the id of self

get_mapping_name()
Returns:

a new allocated string. It must be freed with GLib.free() when done.

Return type:

str

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

New in version 0.16.

get_name()
Returns:

a new allocated string. It must be freed with GLib.free() when done.

Return type:

str

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

New in version 0.16.

get_partial_name()
Returns:

a new allocated string. It must be freed with GLib.free() when done.

Return type:

str

Gets the partial name of self.

New in version 0.16.

is_read_only()
Returns:

True if self is read only

Return type:

bool

Checks whether self is read only

signature_validate_async(flags, cancellable, callback, *user_data)
Parameters:

Asynchronously validates the cryptographic signature contained in signature_field.

New in version 21.12.0.

signature_validate_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

a Poppler.SignatureInfo structure containing signature metadata and validation status Free the returned structure with Poppler.SignatureInfo.free().

Return type:

Poppler.SignatureInfo

Finishes validation of the cryptographic signature contained in signature_field. See Poppler.FormField.signature_validate_async().

New in version 21.12.0.

signature_validate_sync(flags, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

a Poppler.SignatureInfo structure containing signature metadata and validation status Free the returned structure with Poppler.SignatureInfo.free().

Return type:

Poppler.SignatureInfo

Synchronously validates the cryptographic signature contained in signature_field.

New in version 21.12.0.

text_do_scroll()
Return type:

bool

text_do_spell_check()
Returns:

True if spell checking should be done for self

Return type:

bool

Checks whether spell checking should be done for the contents of self

text_get_max_len()
Returns:

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

Return type:

int

Retrieves the maximum allowed length of the text in self

text_get_text()
Returns:

a new allocated string. It must be freed with GLib.free() when done.

Return type:

str

Retrieves the contents of self.

text_get_text_type()
Returns:

Poppler.FormTextType of self

Return type:

Poppler.FormTextType

Gets the text type of self.

text_is_password()
Returns:

True if the content of self is a password

Return type:

bool

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

text_is_rich_text()
Returns:

True if the contents of self are rich text

Return type:

bool

Checks whether the contents of self are rich text

text_set_text(text)
Parameters:

text (str) – the new text

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