← All updates

Page numbers for Markdown renders

Markdown to PDF renders can now carry footer page numbers — three formats, three positions, right-aligned by default.

markdownapi

Markdown renders have never been able to show page numbers: the DSL has always had footers with Page n of n, but the Markdown path had no option for it. POST /api/v1/md (and its always-paid twin /api/v1/markdown) now accepts two options:

  • pageNumbers — "page-n-of-total" renders Page 3 of 12, "n-of-total" renders 3 / 12, and "n" renders just 3. Leave it out and the document is unchanged (no footer, exactly as before).
  • pageNumberPosition — "left", "center" or "right" (the default).

Both work as body options and as YAML frontmatter, with the usual precedence — an explicit body option wins, frontmatter fills the gaps:

---
pageNumbers: n-of-total
pageNumberPosition: right
---

# Quarterly Report

The number sits in the page footer, small and muted, and the layout engine reserves its height so body content never runs into it — including with custom margins. The footer is tagged as pagination chrome rather than body content, so output stays PDF/A-2A + PDF/UA-1 compliant.

The option is also on the Markdown tool — two new dropdowns, defaulting to "Page 3 of 12" in the bottom-right — and the render_markdown MCP tool, so agents and the web UI reach the same three formats.