Using PDFBox: Is it possible to trigger the action script connected to a (checkbox) field?

56 views Asked by At

I'm using Apache PDFBox to fill out a PDF form from my (Kotlin) application. There are some checkboxes in the form that have JavaScript actions attached to them, performing some action depending on the checked value.

My problem is that the actions do not seem to be triggered when the form is programatically filled out through PDFBox. I am able to edit the PDF, and have tried different action triggers without any luck. The action trigger "mouse up" makes sure it gets triggered when a user manually fills out the form, but not when PDFBox does it.

Is there a way to trigger execution of the action from PDFBox?

I have tried looking through the documentation of the PDAction API, but I can't really figure out how it's supposed to be used, and if it's possible at all.

Appreciate any help here! Thanks!

0

There are 0 answers