The clickable contents down the side
Give the document a folding contents list beside the pages, each line leading straight to a page.
Summary
In a thick binder, dividers with tabs let you find a section without leafing through. Lines can carry further lines, like a book's contents with its chapters and sub-chapters, and you decide which ones open of their own accord the first time the document is shown.
Technically
Written at the top level of a request, under
"bookmarks"
bookmarks writes the /Outlines tree reading software shows in its side panel. Each bookmark has a title, the page it leads to, and possibly further bookmarks nested under it. The array's order is the display order. For the panel to open by itself when the document opens, ask for it through reading.open_mode. A bookmark leading to a page the document does not have is refused.
Request schema
-
bookmarks— array, optional, empty by default. -
bookmarks[].title— string, required. What reading software shows for it. -
bookmarks[].page— integer ≥ 1, required. The page the bookmark leads to. A page the document does not have is refused, and the answer names it in the numbering the request used. -
bookmarks[].open— boolean, optional,falseby default. Shows what is nested under it without being asked. -
bookmarks[].children— array, optional, empty by default. The bookmarks nested under this one, same shape, to any depth.
A bookmark leads to a page by its number. For a landing place that follows the document rather than the number, go through destinations and a link item that names it.
A whole request that creates a PDF
{
"bookmarks": [
{
"title": "Contents",
"page": 1,
"open": true,
"children": [{ "title": "The annex", "page": 2 }]
}
],
"standard_fonts": [{ "name": "sans", "face": "helvetica" }],
"items": [
{
"type": "text",
"pages": [1],
"rect": { "llx": 60, "lly": 740, "urx": 535, "ury": 768 },
"content": ["Contents"],
"font": "sans",
"font_size": 18
},
{
"type": "text",
"pages": [2],
"rect": { "llx": 60, "lly": 740, "urx": 535, "ury": 768 },
"content": ["The annex"],
"font": "sans",
"font_size": 18
}
]
}
Finding one's way through it
The order one field leads to the next What a page sets off as reading software comes and goes What the document says it is made of Landing places that have a name Following an article column by column How the document opens and prints
Where to go next
Every JSON key of a request, in one page The other forty-one settings of a request