[Feature Request/glib] access to Trigger Event Actions
The standard PDF 32000-1:2008, section 12.6.3 “Trigger Events”, defines actions which can be bound to e.g. focus events of form input elements. See the attached simple example which shows a JavaScript dialogue when the yellow input field receives or looses the focus, respectively, in addition to a JavaScript dialogue bound to the input field's additional VALIDATE
action.
However, it seems to be impossible to access the scripts bound to the trigger events using the glib bindings. For this example, using libpoppler-glib8
version 22.12.0-2+b1 on Debian Bookworm:
- The list returned by
poppler_page_get_link_mapping()
does not contain anyPOPPLER_ACTION_JAVASCRIPT
items. - The list returned by
poppler_page_get_annot_mapping()
contains only aPOPPLER_ANNOT_WIDGET
(20) item, for which no correspondingPopplerAnnot*
structure is defined – this is probably the right items, though. - The form element, contained in the list returned by
poppler_page_get_form_field_mapping()
, does not have an associatedPopplerAction
(i.e.poppler_form_field_get_action() == NULL
). Onlypoppler_form_field_get_additional_action(item, POPPLER_ADDITIONAL_ACTION_VALIDATE_FIELD)
properly returns aPopplerActionJavascript
, containing the correct JavaScript.
Would it be possible to provide an interface for accessing these actions?