Choose a PDF template
A PDF template sets the page size, margins, text size, cover, contents and running header and
footer of every publication. Pick one of four built-in templates with pdf in
opend.config.yaml, and change any of its settings.
Built-in templates
| Template | What it gives you |
|---|---|
standard | The default. A4 portrait, normal margins, 10.5 pt text, a title page with the title in the accent colour, contents, each chapter on a new page, the publication title in the header and page numbers in the footer. |
report | US Letter with wide margins, a banner title
page (a full-width band in the accent colour), the site title in the header and
{title} · Release {release} in the footer. |
compact | Dense A4 for printing: narrow margins, 9.5 pt text, no title page (a title block opens the first page) and chapters that run on. |
handbook | Pocket-sized A5 in a serif face, with a plain left-aligned title page, no header and the publication title in the footer. |
| Setting | Values | What it does |
|---|---|---|
template |
standard, report, compact,
handbook |
The built-in template the other settings change. Default standard.
Every other setting defaults to the template's own value. |
pageSize |
A4, Letter, Legal, A5 |
The paper size. |
orientation |
portrait, landscape |
Which way up the page is. |
margins |
normal, narrow, wide |
Page margins: 20/18 mm, 14/12 mm or 26/25 mm (top and bottom / sides). |
fontSize |
small, normal, large |
Body text of 9.5, 10.5 or 11.5 points. |
font |
default, system, humanist,
serif, rounded, mono |
The body font. default follows the site theme. Only fonts installed on the
server that prints the PDF are used. |
cover |
classic, banner, minimal,
none |
The title page. none puts a title block at the top of the first page
instead. |
coverNote |
text | An extra line on the cover, such as Confidential. |
toc |
true, false |
Print the contents after the cover. |
chapterBreaks |
true, false |
Start every top-level chapter, and the first page after the contents, on a new page. |
header |
text | Text at the top of every page; empty for none. {title} (the publication),
{site} (the site title), {release} and {date}
(when the PDF was printed) are filled in. |
footer |
text | Text at the foot of every page, before the page number, with the same placeholders. |
pageNumbers |
true, false |
Print page / pages at the foot of every page. |
Example
pdf:
template: report
pageSize: A4 # the report layout, on A4 paper
coverNote: Confidential: for customers only
footer: '{title} · {date}'
Quote text that starts with {: unquoted, YAML reads it as a mapping. A setting the
template does not know, or a value it does not allow, is reported as invalid-config.
Print CSS goes in the project theme; see Theme the site, the panel and PDFs.
On a hosted site, staff can choose a template on the admin console's Appearance page instead. Saved there, it replaces these settings for every release until it is reset; see Change the site's look from the admin console.