THPDFAnnotationJavaScriptTrigger Type
Selects the /AA trigger event that fires a JavaScript action attached to an annotation (PDF 1.7 ISO 32000-1 12.6.3)
Declaration
THPDFAnnotationJavaScriptTrigger= (ajtMouseEnter, // /AA /E
ajtMouseExit, // /AA /X
ajtMouseDown, // /AA /D
ajtMouseUp, // /AA /U
ajtSetFocus, // /AA /Fo
ajtLostFocus, // /AA /Bl
ajtPageOpen, // /AA /PO
ajtPageClose, // /AA /PC
ajtPageVisible, // /AA /PV
ajtPageInvisible); // /AA /PI
Unit
HPDFDoc
Values
| Value | Meaning |
|---|---|
ajtMouseEnter | /AA /E: the script runs when the cursor enters the annotation rectangle |
ajtMouseExit | /AA /X: the script runs when the cursor leaves the annotation rectangle |
ajtMouseDown | /AA /D: the script runs when a mouse button is pressed on the annotation |
ajtMouseUp | /AA /U: the script runs when a mouse button is released on the annotation |
ajtSetFocus | /AA /Fo: the script runs when the annotation receives input focus |
ajtLostFocus | /AA /Bl: the script runs when the annotation loses input focus |
ajtPageOpen | /AA /PO: the script runs when the page containing the annotation is opened |
ajtPageClose | /AA /PC: the script runs when the page containing the annotation is closed |
ajtPageVisible | /AA /PV: the script runs when the page containing the annotation becomes visible |
ajtPageInvisible | /AA /PI: the script runs when the page containing the annotation becomes invisible |
Usage notes
- Pass a value of this type to THPDFPage.SetAnnotationJavaScriptAction together with the script text; the library writes a /JavaScript action under the matching /AA key
- The library maps each value to its PDF key (E, X, D, U, Fo, Bl, PO, PC, PV, PI); page-level triggers from ajtPageOpen onward require PDF 1.5 while the mouse and focus triggers require PDF 1.3
- Use THPDFAnnotationActionTrigger instead when the attached action is a general THPDFActionBuilder rather than inline JavaScript