I use libpoppler-glib8 version 22.12.0-2+b1 on Debian Bookworm to read the 
structure of PDF documents and to extract some components from them.  However, 
I could not find a way to actually access trigger events e.g. from forms.

E.g. the attached PDF file has a form field which calls simple JavaScript 
functions for the focus in and out events and for input validation.  I tried 
the following:
* The list returned by `poppler_page_get_link_mapping()` does not contain any 
`POPPLER_ACTION_JAVASCRIPT` items.
* The list returned by `poppler_page_get_annot_mapping()` contains only a 
`POPPLER_ANNOT_WIDGET` (20) item, for which no corresponding `PopplerAnnot*` 
structure is defined – no idea what I should do with it.
* The form element, contained in the list returned by 
`poppler_page_get_form_field_mapping()`, does not have an associated 
`PopplerAction` (i.e. `poppler_form_field_get_action() == NULL`).  Only 
`poppler_form_field_get_additional_action(item, 
POPPLER_ADDITIONAL_ACTION_VALIDATE_FIELD)` properly returns a 
`PopplerActionJavascript`, containing the correct script.

Unfortunately, I have no idea how I can access the actions related to the focus 
in and out events (and probably all others defined in PDF 32000-1:2008, section 
12.6.3 “Trigger Events”).  Any insight will be highly appreciated!

Thanks in advance,
Albrecht.

Attachment: Test.pdf
Description: Adobe PDF document

Attachment: pgpfGyfbijd5t.pgp
Description: PGP signature

Reply via email to