A stamp laid across the page

Lay one word across an area, at the size that fills the box: draft, paid, copy, cancelled, on the diagonal or flat.

Summary

DRAFT, PAID, COPY: the big word you see lying across a document. You choose the direction: rising towards the top-right corner, falling towards the bottom-right corner, or lying flat. A pale colour and a light shadow are enough to make it felt without getting in the way of the document underneath.

Technically

Asked for with "type": "stamp"

A stamp is what a document says about itself rather than what it says. Its font size is derived: the engine fits the line to the diagonal or to the width of the box, then applies the share of the box asked for, 0.95 by default, which leaves a margin all round. The same stamp therefore suits a label and a poster with no change of setting. The line is drawn as ordinary text under the slant. The shadow's offset is counted in points on the page, so it falls the same way whichever way the line runs. A rotation adds itself on top of the chosen slant.

Request schema

Required keys: content, a string, the stamp's line; rect; font, the name of a declared font. Optional: span, a number, the share of the box filled, 1 filling it whole, default 0.95; slant, one of up (default, from the lower-left corner to the upper-right one), down or flat; color (default black); shadow, an object of dx, dy and color, all three required; pages, an array of one-based integers, default empty; transform, six numbers; rotate, degrees counter-clockwise about the centre of the rectangle; layer, the name of a declared layer. Cross refusal: transform together with rotate. The font size follows from the box: span is the key that tunes it.

A whole request that creates a PDF

{
  "standard_fonts": [{"name": "sans", "face": "helvetica_bold"}],
  "items": [
    {
      "type": "stamp",
      "content": "DRAFT",
      "slant": "up",
      "rect": {"llx": 72, "lly": 500, "urx": 523, "ury": 700},
      "font": "sans",
      "color": [0.75, 0.16, 0.16]
    }
  ]
}

The line that sends it, in three languages

Text

A block of text placed on the page Text in paragraphs, with indents and tab stops A line of words set along a path Blocks laid one under the other, page after page

Where to go next

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

See the prices See the examples