The Unit a Page Is Measured In

State how many points one unit of a page is, for a sheet larger than the 14 400 points a PDF measures in.

Summary

A PDF measures everything in points, and it cannot count past 14 400 of them: a little over five metres. A poster, a plan or a banner longer than that is drawn at a scale instead — the page says that one of its own units is worth so many points, and every number it carries is read at that scale. A plan stated in units worth ten points each reaches fifty metres on the same sheet.

Technically

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

page_units writes the /UserUnit of a page: how many points one of that page's units is. Reading software and a printing works multiply the page's sheet and every coordinate on it by that number, so what is drawn keeps its proportions and the sheet grows. It is read from PDF 1.6 onwards; older reading software shows the page at its bare numbers. A page named twice is measured in the last unit given for it, and a number that is not a positive length is refused rather than written.

Request Schema

  • page_units — array, optional, empty by default.
  • page_units[].page — integer ≥ 1, required. The page the entry is for.
  • page_units[].unit — number > 0, required. How many points one of that page's units is.

A page nothing names keeps the point as its unit, which is what every other setting of a request is stated in.

A Whole Request That Creates a PDF

{
  "page_units": [
    { "page": 1, "unit": 10 }
  ],
  "standard_fonts": [{ "name": "sans", "face": "helvetica" }],
  "items": [
    {
      "type": "text",
      "rect": { "llx": 60, "lly": 740, "urx": 535, "ury": 765 },
      "content": ["A plan drawn at ten points to the unit"],
      "font": "sans",
      "font_size": 14
    }
  ]
}

The line that sends it, in three languages

The sheet, and what is laid under it

The Size of the Pages A Size of Its Own for Certain Pages Where a Page's Sheet Sits in the Drawing The Areas a Page States The Shapes a Page Lays over What It Draws Which Way up a Page Is Shown How a Page Arrives, and How Long It Stands A PDF You Send, as the Pages Themselves How Far a Supplied PDF Is Allowed to Unpack The Template under the Pages A Watermark Laid across a Run of Pages Named Regions a Page Marks for Filling

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