A button the reader presses

Place a button that acts instead of answering: open an address, go to a page, send the form or reset it.

Asked for with "type": "push_button"

In plain words

Written for anybody. It says what this puts on a sheet of paper, and asks nothing of you beyond that.

This is the button you press in a document shown on screen: "Send", "Clear", "Next page". It acts instead of gathering an answer. You write the word shown on it, and you may plan another for when the mouse passes over, and a third while it is held down. You can also put a small drawing on it, alone or beside the word, above it, below it, to its left or to its right.

For a developer

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

A button is the one field carrying no value: pressing it acts, and what it does is the action the request hangs on it. The three captions match the three states — at rest, under the pointer, held down — and the last two, left out, take the resting one. The icon is the name of a drawing the request declared; how it sits in the box is set by a dedicated object, which says when to resize, whether to keep the proportions, and where the icon lands in the room left over. The layout picks between the word alone, the icon alone, and the five ways of pairing them.

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.

Required keys: name, a string; rect; font; font_size. Optional keys of the button itself: caption, rollover_caption, down_caption, strings (the last two, absent, take caption); layout, one of caption_only (default), icon_only, caption_below_icon, caption_above_icon, caption_right_of_icon, caption_left_of_icon or caption_over_icon; icon, rollover_icon, down_icon, names of declared drawings; icon_fit, an object of scale (always, when_bigger, when_smaller, never), stretch (proportional, anamorphic), leftover_left and leftover_bottom (numbers from 0 to 1, the two together) and ignore_border (a boolean at false); action, one of the eight actions described on the link page. Optional keys shared by every field: read_only, required, no_export, booleans at false; background; border (a required width, a color in light, a style); pages, default empty; relative_to. Cross refusals: leftover_left without leftover_bottom, and the other way round; a CMYK or named-space colour in border.color.

A whole request that draws it

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

{
  "standard_fonts": [{"name": "sans", "face": "helvetica"}],
  "items": [
    {
      "type": "push_button",
      "name": "reset",
      "rect": {"llx": 72, "lly": 700, "urx": 172, "ury": 722},
      "font": "sans",
      "font_size": 11,
      "caption": "Clear the form",
      "border": {"width": 0.75},
      "action": {"reset_fields": {}}
    }
  ]
}

The line that sends it, in three languages

Form fields

A box the reader types into A box the reader ticks A list the reader picks from Several buttons, one answer The place kept for a signature

Where to go next

Every key of a request, in one page The other twenty things you can draw

See the prices See the examples

Glossary

CMYK
The four inks a printing press lays down: cyan, magenta, yellow and black. A screen mixes light instead, so a document going to a press states its colours in inks, not in screen colours.
font
The drawing of every letter, digit and mark a document writes, held in a file of its own. A PDF carries the fonts it is set in inside itself, which is why it opens looking the same on a machine that has never had them. Leave them out and a reader puts another font in their place, and the layout moves.
request
One call to the service: you send what the document should say, and get the document back. Your bill counts these calls, one for each document. The number of pages inside a document is never counted.

Every word the site explains