Hello,
It appears to me that assigning a JavaScript action doesn't work for the Calculate event of a PdfTextBoxFieldWidget, but does for other events like the Validate.
If you create a new document with a Javascript for the Calculation event, it works fine. However, if a Javascript for the Calculate event is to be subsequently introduced into an existing document, the assignment fails.
In order to understand the phenomenon, a working document (document1.pdf) is attached that was created entirely with Spire.Pdf.
Attached is also a second one (dcoument2.pdf) that was created in the same way, except for the Javascript action for the text fields. Unless I am wrong, this document should work as well by subsequent insertion using the attached code.
Best regards
LC