The numbers reading software shows

Restart the numbering somewhere in the document, in roman numerals, in letters, or behind a prefix.

Summary

In a book, the opening pages — the preface, the contents — are numbered in small roman numerals, and the real text starts again at page 1. The annex often shows A-1, A-2. What you are setting is the number the reading software shows in its little box, the one you type to jump straight to a page — rather than the number printed on the sheet, which is yours to draw.

Technically

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

renumber writes the /PageLabels number tree: each entry opens a range of pages at a one-based page, with its style in /S, its prefix in /P and its first number in /St, and makes the number reading software shows start again from that sheet. That number is a separate thing from the sheet's physical position in the file; it lives in the page label. Six spellings exist, one of which writes a prefix and no figure at all. The {page_label} substitute inside a text draws that label as reading software shows it.

Request schema

  • renumber — array, optional, empty by default.
  • renumber[].from_page — integer, required. The sheet the restart takes effect from; sheets count from 1.
  • renumber[].value — integer ≥ 1, required. The number shown on that sheet. Zero is refused: the numbering reading software shows has no way to spell it.
  • renumber[].style — string, optional, decimal by default. Six values: decimal (1, 2, 3), upper_roman (I, II, III), lower_roman (i, ii, iii), upper_letters (A, B, C then AA, BB), lower_letters (a, b, c then aa, bb), prefix_only (the prefix alone, no figure).
  • renumber[].prefix — string, optional, empty by default. What each page of the range shows before its number: A- for an annex numbered A-1, A-2.

A whole request that creates a PDF

{
  "renumber": [
    { "from_page": 1, "value": 1, "style": "lower_roman" },
    { "from_page": 3, "value": 1, "style": "decimal" }
  ],
  "standard_fonts": [{ "name": "sans", "face": "helvetica" }],
  "items": [
    {
      "type": "text",
      "rect": { "llx": 60, "lly": 60, "urx": 535, "ury": 74 },
      "content": ["Page {page_label}"],
      "font": "sans",
      "font_size": 10,
      "align": "center"
    },
    {
      "type": "text",
      "pages": [4],
      "rect": { "llx": 60, "lly": 740, "urx": 535, "ury": 765 },
      "content": ["The annex"],
      "font": "sans",
      "font_size": 14
    }
  ]
}

The line that sends it, in three languages

The document as a whole

A hundred letters in a single file What the document says about itself What the document says about itself, said once The notes a program leaves in the file for itself The notes a program leaves on one page The data a program hangs on a run of ink A file still readable decades from now The print standard the document claims The password that opens it, and what may be done with it An invoice a person and a machine both read The address relative links are read against The PDF version the file declares What a picture says about itself, and how it is read The attachments the document carries beside its pages The attachments shown as a portfolio Which attachments a page claims The identity card a single page carries The accessibility standard the document claims The standards the finished document is measured against

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