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.
Written at the top level of a request, under
"articles"
In plain words
Written for anybody. It says what this puts on a sheet of paper, and asks nothing of you beyond that.
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. Nothing on the sheet says which carries on which: the reader has to look. Here, it can be said: these are the pieces of this article, in the order they are read. The reading software then jumps from the foot of one piece to the head of the next, on the right page, with nothing to look for.
For a developer
Written for somebody who writes the calling program: the model, the units, and the settings that carry the weight.
articles declares reading threads: each carries a title and the run of page patches it goes over, in order. A reader 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 bottom-left corner, its width and its height, on a page named by number. A thread also describes itself by author, subject and keywords.
Every key, with its default
The reference: which keys are required, which are optional, what each one defaults to and which combinations the server declines.
-
articles— array, optional, empty by default. -
articles[].title— string, required. What the reader 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[].x,patches[].y— numbers, required. The bottom-left corner. -
patches[].width,patches[].height— numbers, required.
A whole request that draws it
Post this as it stands and a PDF comes back. Nothing has been left out of it.
{
"articles": [
{
"title": "The bridge reopens",
"author": "Claire Vasseur",
"patches": [
{ "page": 1, "x": 60, "y": 500, "width": 220, "height": 240 },
{ "page": 2, "x": 60, "y": 500, "width": 220, "height": 240 }
]
}
],
"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 The clickable contents down the side Landing places that carry a name How the document opens and prints
Where to go next
Every key of a request, in one page The other thirty-two settings of a request