Which way up a page is shown

Turn a page a quarter turn before a reader shows it, without moving anything drawn on the sheet.

Written at the top level of a request, under "page_turns"

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 report, a wide table sits better lying down than standing up. Nothing is redrawn: you simply ask for that one page to be presented a quarter turn round. It is the gesture you make with a sheet of paper, turning it in your hands to read what is written sideways. The drawing stays put; the sheet is what turns.

For a developer

Written for somebody who writes the calling program: the model, the units, and the settings that carry the weight.

page_turns gives, page by page, the rotation a reader applies before showing the sheet. The content is not moved: the sheet turns, clockwise. That is how a landscape page lives inside a portrait document. It is a different thing from an item's rotate, which turns the drawing itself on a sheet that stays where it is.

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.

  • page_turns — array, optional, empty by default.
  • page_turns[].page — integer ≥ 1, required. The page the entry is for.
  • page_turns[].turn — string, required. Four values: upright (shown as it was drawn), right (a quarter turn clockwise), upside_down (a half turn), left (a quarter turn anticlockwise).

An entry says how a page is shown, not that there is one: a page named past the end of the document leaves the document as long as it already was. A page named twice takes the last turn given for it.

A whole request that draws it

Post this as it stands and a PDF comes back. Nothing has been left out of it.

{
  "page_turns": [{ "page": 1, "turn": "right" }],
  "standard_fonts": [{ "name": "sans", "face": "helvetica" }],
  "items": [
    {
      "type": "text",
      "rect": { "llx": 60, "lly": 740, "urx": 535, "ury": 765 },
      "content": ["Drawn upright, shown on its side"],
      "font": "sans",
      "font_size": 14
    }
  ]
}

The line that sends it, in three languages

The sheet, and what is laid under it

The size of the pages A size of its own for certain pages The areas a page states The headed paper under the pages

Where to go next

Every key of a request, in one page The other thirty-two settings of a request

See the prices See the examples