Skip to content

zeropdf v1.3.0


zeropdf / FieldActions

Interface: FieldActions

Defined in: src/types.ts:2498

JavaScript actions attached to a form field.

Key mapping (ISO 32000-2 Table 217):

  • keystroke → /K (Keystroke action)
  • format → /F (Format action)
  • validate → /V (Validate action)
  • calculate → /C (Calculate action)

Each string is raw PDF JavaScript source code. The library emits each non-null action as a PDF stream object referenced from the /AA dictionary on the field annotation.

Properties

PropertyTypeDescriptionDefined in
calculate?stringCalculate JS → /C in the /AA dict.src/types.ts:2506
format?stringFormat JS → /F in the /AA dict.src/types.ts:2502
keystroke?stringKeystroke JS → /K in the /AA dict.src/types.ts:2500
validate?stringValidate JS → /V in the /AA dict.src/types.ts:2504

Released under the ISC license.