The order one field leads to the next

Say the order the tab key walks a page's links and fields in: row by row, or column by column.

Summary

On a form filled in on screen, the tab key jumps from field to field — and something has to decide which field is « the next one ». On a form in two columns, going all the way down the left before crossing to the right is one reading; crossing the page row by row is another, and the two give a very different experience of the same sheet.

Technically

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

page_tab_orders writes /Tabs on the pages it names, which settles the order reading software walks everything a page carries as annotations: its links, its form fields and the rest. Five orders exist — by row, by column, by the structure tree, and the two the format only added at 2.0, which therefore ask the document to declare that version. A page no entry names leaves the order to the reading software; in a tagged document, a page carrying a link or a field states the structure order of its own accord.

Request schema

  • page_tab_orders — array, optional, empty by default.
  • page_tab_orders[].page — integer ≥ 1, required. The page the entry is for.
  • page_tab_orders[].order — string, required. Five values: row (across the page, then down it), column (down the page, then across it), structure (the order the structure tree reads the page in), annotations (the order the page lists its annotations in), widgets (the same, the fields first).
  • annotations and widgets ask the request for "version": "2.0"; short of that the render is refused rather than write an order the declared version could not be read to hold.

An entry says how a page is walked, not that there is one. A page named twice takes the last order given for it.

A whole request that creates a PDF

{
  "page_tab_orders": [{ "page": 1, "order": "row" }],
  "standard_fonts": [{ "name": "sans", "face": "helvetica" }],
  "items": [
    {
      "type": "text",
      "rect": { "llx": 60, "lly": 740, "urx": 535, "ury": 760 },
      "content": ["Two links, walked across the page"],
      "font": "sans",
      "font_size": 12
    },
    {
      "type": "link",
      "rect": { "llx": 60, "lly": 700, "urx": 160, "ury": 720 },
      "to": { "uri": "https://hqf-pdf.com/" }
    },
    {
      "type": "link",
      "rect": { "llx": 200, "lly": 700, "urx": 300, "ury": 720 },
      "to": { "uri": "https://hqf-pdf.com/en/" }
    }
  ]
}

The line that sends it, in three languages

Finding one's way through it

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 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

See the prices See the examples