The Sets of Layers Reading Software Offers

Offer named sets of layer states beside the one the document opens under, so reading software can switch between them.

See It in a Real PDF

One Drawing, and Each Reader Sees Their Own

The same floor plan on six layers shown and hidden one at a time: the furniture and the distances shown, the internal notes hidden until asked for, and a draft watermark meant for the screen and not for the paper.

Open the PDF The Whole Example

Summary

A drawing carrying its plumbing, its wiring and its walls on separate layers is read differently by each trade. A set is a named arrangement of those layers — « Plumbing », « Wiring » — that reading software offers in its own panel: one click and the drawing is the one that trade needs. The document still opens on the arrangement it states for itself.

Technically

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

layer_configurations writes the alternate configurations of the document's optional content: one per named set, each listing the declared layers it shows. A set naming none shows none. The configuration the document opens under is the one the layers themselves state; these stand beside it, in the order they are written.

Request Schema

  • layer_configurations — array, optional, empty by default.
  • layer_configurations[].name — string, required. What reading software offers the set under in its panel.
  • layer_configurations[].shows — array of strings, optional, empty by default. The declared layers the set shows; every other declared layer is hidden in it.

A name reading software offers is shown to somebody reading, so it is worth writing in the language of the document rather than in the words the request uses for its layers.

A Whole Request That Creates a PDF

{
  "layers": [{ "name": "Walls" }, { "name": "Wiring" }],
  "layer_configurations": [
    { "name": "Wiring only", "shows": ["Wiring"] },
    { "name": "Everything", "shows": ["Walls", "Wiring"] }
  ],
  "standard_fonts": [{ "name": "sans", "face": "helvetica" }],
  "items": [
    {
      "type": "text",
      "rect": { "llx": 60, "lly": 740, "urx": 535, "ury": 765 },
      "content": ["A drawing a reader can show one trade at a time"],
      "font": "sans",
      "font_size": 14
    }
  ]
}

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 Drawings Read from SVG Files Layers Reading Software Shows One of at a Time

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