Layers reading software shows one of at a time

Tie layers together so that showing one of them turns the others off, the way a set of radio buttons works.

Summary

A sheet written twice, once in French and once in English, carries one wording on each layer, and showing both at once lays one text over the other. A family ties those layers together: reading software shows one of them and takes the others off by itself, the way a set of radio buttons works. Three states of one drawing — before the work, during it, after it — go together the same way. A family settles what happens when a reader switches something on, never what the document opens on: that stays what each layer says for itself.

Technically

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

layer_families writes the /RBGroups entry of the document's optional content: one array per family, naming the declared layers it holds. Reading software shows at most one layer of a family, and showing one takes the others off. A family carries no name and is never offered in a panel of its own; it only ties the layers it holds together. A family naming a layer the request did not declare is refused, and so is a layer held by two families, since each would take the other's members off and nothing would state which one reading software obeys. The configuration the document opens under is left alone, and stays what the layers say through visible.

Request schema

  • layer_families — array, optional, empty by default.
  • layer_families[].layers — array of strings, optional, empty by default. The declared layers the family holds. A family holding none is written as nothing.

A family says which layers cannot stand together, never which of them stands first: that is each layer's own visible. A family whose layers all start hidden is written as it stands, because reading software shows at most one layer of a family rather than exactly one.

A document stating an archive standard keeps its families: a family is part of the arrangement a reader works by hand, not a state the file applies to itself.

A whole request that creates a PDF

{
  "layers": [
    { "name": "French wording" },
    { "name": "English wording", "visible": false }
  ],
  "layer_families": [
    { "layers": ["French wording", "English wording"] }
  ],
  "standard_fonts": [{ "name": "sans", "face": "helvetica" }],
  "items": [
    {
      "type": "text",
      "rect": { "llx": 60, "lly": 740, "urx": 535, "ury": 765 },
      "content": ["Plan du premier etage"],
      "font": "sans",
      "font_size": 14,
      "layer": "French wording"
    },
    {
      "type": "text",
      "rect": { "llx": 60, "lly": 740, "urx": 535, "ury": 765 },
      "content": ["First floor plan"],
      "font": "sans",
      "font_size": 14,
      "layer": "English wording"
    }
  ]
}

The line that sends it, in three languages

What is drawn, and how it comes out

Everything that can be drawn on a page The file's weight and the time it takes The first page, shown while the rest arrives Layers reading software shows or hides A name that stands for several layers at once A drawing made once, shown by a button The sets of layers reading software offers

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