Following an article column by column
Say the order the pieces of one article are read in, when it runs across several columns and several pages.
Summary
In a newspaper, an article starts on the front page, in one column, and finishes three pages further on. Beside it, another article does the same, and nothing on the sheet says which carries on which: the reader has to look. Written down, it lets the reading software jump from the foot of one piece to the head of the next, on the right page, with nothing to look for.
Technically
Written at the top level of a request, under
"articles"
articles writes the /Threads array: each thread has a title and the string of page patches it goes over, in reading order. Reading software following a thread moves from the foot of one patch to the head of the next, whichever page that is. Each patch is a rectangle given by its four edges — left, bottom, right and top — on a page named by number; inside the file one such patch is a /Bead dictionary, and the string of them is the thread. A thread also describes itself by author, subject and keywords.
Request schema
-
articles— array, optional, empty by default. -
articles[].title— string, required. What reading software shows for it. -
articles[].author— string, optional. Absent, the thread says nothing of it. -
articles[].subject— string, optional. Absent, the thread says nothing of it. -
articles[].keywords— string, optional. Absent, the thread states none. -
articles[].patches— array, required, at least one entry. The patches it is read through, in reading order. A thread with no patch is refused. -
patches[].page— integer ≥ 1, required. The page the patch sits on. A page the document does not have is refused. -
patches[].llx,patches[].lly,patches[].urx,patches[].ury— numbers, required. The left edge, the foot, the right edge and the top of the patch, in points from the bottom-left corner of the sheet, as every rectangle in a request is written.
A whole request that creates a PDF
{
"articles": [
{
"title": "The bridge reopens",
"author": "Claire Vasseur",
"patches": [
{ "page": 1, "llx": 60, "lly": 500, "urx": 280, "ury": 740 },
{ "page": 2, "llx": 60, "lly": 500, "urx": 280, "ury": 740 }
]
}
],
"standard_fonts": [{ "name": "sans", "face": "helvetica" }],
"items": [
{
"type": "text",
"pages": [1],
"rect": { "llx": 60, "lly": 500, "urx": 280, "ury": 740 },
"content": ["The bridge reopens after two years of work,"],
"font": "sans",
"font_size": 10
},
{
"type": "text",
"pages": [2],
"rect": { "llx": 60, "lly": 500, "urx": 280, "ury": 740 },
"content": ["and the buses run over it again from Monday."],
"font": "sans",
"font_size": 10
}
]
}
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 The clickable contents down the side Landing places that have a name 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