Class: Poppler::FormField

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#actionPoppler::Action

Retrieves the action (Poppler::Action) that shall be performed when field is activated, or nil

Returns:

  • (Poppler::Action)

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

#alternate_ui_nameString

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

Returns:

  • (String)

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

#button_get_button_typePoppler::FormButtonType

Gets the button type of field

Returns:

#button_get_stateBoolean

Queries a Poppler::FormField and returns its current state. Returns true if field is pressed in and false if it is raised.

Returns:

  • (Boolean)

    current state of field

#button_set_state(state) ⇒ nil

Sets the status of field. Set to true if you want the Poppler::FormField to be 'pressed in', and false to raise it.

Parameters:

  • state (Boolean)

    true or false

Returns:

  • (nil)

#choice_can_select_multipleBoolean

Checks whether field allows multiple choices to be selected

Returns:

  • (Boolean)

    true if field allows multiple choices to be selected

#choice_commit_on_changeBoolean

Returns:

  • (Boolean)

#choice_do_spell_checkBoolean

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

Returns:

  • (Boolean)

    true if spell checking should be done for field

#choice_get_choice_typePoppler::FormChoiceType

Gets the choice type of field

Returns:

#choice_get_item(index) ⇒ String

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

Parameters:

  • index (Integer)

    the index of the item

Returns:

  • (String)

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

#choice_get_n_itemsInteger

Returns the number of items on field

Returns:

  • (Integer)

    the number of items on field

#choice_get_textString

Retrieves the contents of field.

Returns:

  • (String)

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

#choice_is_editableBoolean

Checks whether field is editable

Returns:

  • (Boolean)

    true if field is editable

#choice_is_item_selected(index) ⇒ Boolean

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

Parameters:

  • index (Integer)

    the index of the item

Returns:

  • (Boolean)

    true if item at index is currently selected

#choice_select_item(index) ⇒ nil

Selects the item at the given index on field

Parameters:

  • index (Integer)

    the index of the item

Returns:

  • (nil)

#choice_set_text(text) ⇒ nil

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

Parameters:

  • text (String)

    the new text

Returns:

  • (nil)

#choice_toggle_item(index) ⇒ nil

Changes the state of the item at the given index

Parameters:

  • index (Integer)

    the index of the item

Returns:

  • (nil)

#choice_unselect_allnil

Unselects all the items on field

Returns:

  • (nil)

#field_typePoppler::FormFieldType

Gets the type of field

Returns:

#font_sizeFloat

Gets the font size of field

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

Returns:

  • (Float)

    the font size of field

#get_additional_action(type) ⇒ Poppler::Action

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

Parameters:

Returns:

  • (Poppler::Action)

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

#idInteger

Gets the id of field

Returns:

  • (Integer)

    the id of field

#is_read_onlyBoolean

Checks whether field is read only

Returns:

  • (Boolean)

    true if field is read only

#mapping_nameString

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

Returns:

  • (String)

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

#nameString

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

Returns:

  • (String)

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

#partial_nameString

Gets the partial name of field.

Returns:

  • (String)

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

#signature_validate_async(flags, cancellable, callback, user_data) ⇒ nil

Asynchronously validates the cryptographic signature contained in signature_field.

Parameters:

  • flags (Poppler::SignatureValidationFlags)

    Poppler::SignatureValidationFlags flags influencing process of validation of the field signature

  • cancellable (Gio::Cancellable)

    optional #GCancellable object

  • callback (Gio::AsyncReadyCallback)

    a GAsync::ReadyCallback to call when the signature is validated

  • user_data (GObject)

    the data to pass to callback function

Returns:

  • (nil)

#signature_validate_finish(result) ⇒ Poppler::SignatureInfo

Finishes validation of the cryptographic signature contained in signature_field. See poppler_form_field_signature_validate_async().

Parameters:

  • result (Gio::AsyncResult)

    a GAsync::Result

Returns:

  • (Poppler::SignatureInfo)

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

#signature_validate_sync(flags, cancellable) ⇒ Poppler::SignatureInfo

Synchronously validates the cryptographic signature contained in signature_field.

Parameters:

  • flags (Poppler::SignatureValidationFlags)

    Poppler::SignatureValidationFlags flags influencing process of validation of the field signature

  • cancellable (Gio::Cancellable)

    optional #GCancellable object

Returns:

  • (Poppler::SignatureInfo)

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

#text_do_scrollBoolean

Returns:

  • (Boolean)

#text_do_spell_checkBoolean

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

Returns:

  • (Boolean)

    true if spell checking should be done for field

#text_get_max_lenInteger

Retrieves the maximum allowed length of the text in field

Returns:

  • (Integer)

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

#text_get_textString

Retrieves the contents of field.

Returns:

  • (String)

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

#text_get_text_typePoppler::FormTextType

Gets the text type of field.

Returns:

#text_is_passwordBoolean

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

Returns:

  • (Boolean)

    true if the content of field is a password

#text_is_rich_textBoolean

Checks whether the contents of field are rich text

Returns:

  • (Boolean)

    true if the contents of field are rich text

#text_set_text(text) ⇒ nil

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

Parameters:

  • text (String)

    the new text

Returns:

  • (nil)