What a page sets off as a reader comes and goes
Set off an action when a reader arrives at a page, and another when it leaves it.
Summary
A page can be told to do something the moment it is shown — play a sound, jump elsewhere, open an address — and something else the moment the reader turns away from it. What a reader does with either is its own affair: several show nothing at all, so nothing a document needs should hang on one.
Technically
Written at the top level of a request, under
"page_triggers"
page_triggers writes the /AA of a page: /O for arriving and /C for leaving. Each takes one action, of the same shapes an item's action takes. A page named twice takes the last entry given for it, whole, and an entry naming neither leaves the page without an additional-actions dictionary at all.
Request schema
-
page_triggers— array, optional, empty by default. -
page_triggers[].page— integer ≥ 1, required. The page the entry is for. -
page_triggers[].opened— action, optional. What arriving at that page sets off. -
page_triggers[].closed— action, optional. What leaving it sets off.
An archival document is written without them: the standard turns down a page that acts on its own, and the request is refused rather than quietly stripped.
A whole request that draws it
{
"page_triggers": [
{ "page": 1, "opened": { "type": "goto", "page": 1 } }
],
"standard_fonts": [{ "name": "sans", "face": "helvetica" }],
"items": [
{
"type": "text",
"rect": { "llx": 60, "lly": 740, "urx": 535, "ury": 765 },
"content": ["A page that goes back to the first as it opens"],
"font": "sans",
"font_size": 14
}
]
}
Finding one's way through it
The order one field leads to the next What the document says it is made of The clickable contents down the side Landing places that carry a name Following an article column by column How the document opens and prints
Where to go next
Every key of a request, in one page The other forty-one settings of a request