Skip to content

Element Reference ​

All Press elements.

Structure Elements ​

ElementDescriptionValid Children
<press>Root elementdocument, pages, flows, components, styles, data, assets, schema, meta
<document>Page sequence definitionPage references, repeat
<pages>Page definitions containerNamed page definitions
<page>Page definitionAny block elements, flow references
<flows>Flow definitions containerNamed flows, group
<group>Flow group containerNamed flows
<components>Component definitionsNamed component definitions
<styles>Style rules containerTag-name rules, alias
<data>Data container (JSON, CSV, or XML)Structured data
<schema>JSON Schema for data validationJSON Schema definition
<assets>Asset definitionsfonts, colors, images, data
<meta>Settings for the rendered PDFpdf

Layout Elements ​

ElementDescriptionValid Children
<frame>Layout containerAny block or inline elements

Content Elements ​

ElementDescriptionContext
<p>ParagraphBlock
<h1> - <h6>Headings (auto-added to "headings" outline)Block
<blockquote>Block quotationBlock
<pre>Preformatted text (preserves whitespace)Block
<hr>Horizontal ruleBlock

Inline Elements ​

ElementDescription
<span>Inline text styling container
<b> / <strong>Bold text
<i> / <em>Italic text
<u>Underlined text
<s>Strikethrough text
<sup>Superscript
<sub>Subscript
<code>Monospace/code text
<br>Line break
<a>Hyperlink (href attribute)

Table Elements ​

ElementDescriptionValid Children
<table>Table containertr, thead, tbody
<thead>Table header grouptr
<tbody>Table body grouptr
<tr>Table rowtd, th
<td>Table data cellAny block or inline elements
<th>Table header cell (bold, centred)Any block or inline elements

List Elements ​

ElementDescriptionValid Children
<ul>Unordered listli
<ol>Ordered listli
<li>List itemAny block or inline elements, nested ul/ol

Media Elements ​

ElementDescriptionKey Attributes
<img>Imagesrc, width, height, max-width, max-height, transparency, scale, display
<svg>Embedded SVGStandard block attributes
<qr-code>QR code generatordata, width, height, display
<visualization>Chart containerdata, width, height
<x-donut>Donut/pie chartstroke, width, height
<line-plot>Line graphdata, width, height, y-label, x-label, y-min, y-max, y-dp, y-prefix, y-suffix, y-separator, fill

Inline images ​

An <img> takes its own line by default. Set display="inline" to flow it with the surrounding text instead, so it sits on the same line as the words either side of it — the usual choice for icons inside a sentence:

xml
<p>Rating <img src="star" display="inline" height="10pt" /> 4.5
   · Verified <img src="check" display="inline" height="10pt" /> Yes</p>

An <img> written inside an inline element such as <span> or <b> is already inline and needs no attribute.

Flow and Repeat Elements ​

ElementDescriptionKey Attributes
<flow>Flow reference (in pages) or flow definition (in flows)name, type, deferred
<repeat>Iteration directivedata, item, index, flow, group, outline
<show-if>Conditional wrappercondition
<frame-break>Force a page/frame break--

Reference Elements ​

ElementDescriptionKey Attributes
<ref>Display referenced element's textid
<page-number>Display page numberid (optional: target element)
<total-pages>Display total page count--

Counter Elements ​

ElementDescriptionKey Attributes
<counter-define>Define/set a named countername
<counter-value>Increase and display current counter valuename

Style Elements (inside <styles>) ​

ElementDescriptionKey Attributes
<alias>Named style bundlename
<child>Child element targeting rulename

PDF Security Elements (inside <meta>) ​

Declared in the template, with each setting overridable per render by a payload; applied to every production render, and never to a draft — a draft render is never encrypted or restricted. See How to restrict what a reader can do with a PDF.

ElementDescriptionValid Children
<pdf>PDF output settingssecurity
<security>Encrypts the document with AES-256; at most one per templateowner-password, user-password, permissions
<owner-password>The password that lifts the restrictions: a data reference, or fixed text plus references (a template), preferred over a bare literal; generated per render when omittedText
<user-password>The password a reader types to open the document, read from data like the owner password; must differ from the owner passwordText
<permissions>What a reader may do; all seven children required, each a literal or one data reference — omit the element to restrict nothingprinting, modifying, copying, annotating, filling-forms, content-accessibility, document-assembly
<printing>none, low-resolution or high-resolutionText
<modifying>true or false — changing the contentText
<copying>true or false — copying or extracting text and imagesText
<annotating>true or false — adding or editing annotationsText
<filling-forms>true or false — filling in form fieldsText
<content-accessibility>true — extracting content for assistive technology (Papermill rejects false)Text
<document-assembly>true or false — inserting, rotating or deleting pages, and creating bookmarksText

Components ​

ElementDescriptionKey Attributes
<slot>Component content placeholder--