Elements
Bands and stacks hold elements in their content. The type property says which element it is:
| Type | |
|---|---|
text |
Text, with {expressions} interpolated. |
image |
A PNG or JPEG image. |
rect |
A rectangle, drawn with background and border. |
line |
A straight line from (x, y) spanning width and/or height. |
stack |
A container for nesting flow layouts; with border/background it doubles as a box. |
table |
Repeats rows over a secondary dataset (invoice lines, order items). |
barcode |
A barcode or 2D code, drawn as vector graphics. |
chart |
A chart of a dataset’s rows, drawn as vector graphics. |
pageBreak |
Starts a new page. |
subreport |
Another template laid out in place. |
Properties of every element
Section titled “Properties of every element”Every element has these, and the style properties.
Type: text
An optional identifier, for people and tools.
Type: text
A named style for the element.
Type: length
Position inside an absolute band; ignored in flow layouts.
Type: length
Vertical position inside an absolute band.
Type: length
Width in pt (or another unit), % of the container, fr (a share of the space left in a row) or auto.
height
Section titled “height”Type: length
Fixed height. When omitted the element is as tall as its content.
minHeight
Section titled “minHeight”Type: length
Minimum height; the element still grows to fit its content.
visible
Section titled “visible”Type: expression
Leaves the element out where this is false.
Type: keyword
Overrides the default structure role (text → P, image → Figure, …).
One of:
ph1h2h3h4h5h6captionnotefigureartifact: Decoration or pagination: excluded from the structure tree and screen readers.
language
Section titled “language”Type: text
The language of the element’s content (BCP 47, e.g. “ar” or “hi-IN”) when it differs from the document’s. Tagged PDF records it for screen readers, and shaping uses its language-specific forms.
Type: text
Hyperlink target (text template).
bookmark
Section titled “bookmark”Type: text
Text template for a PDF outline entry pointing at this element.