Skip to content

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.

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.

Type: length

Fixed height. When omitted the element is as tall as its content.

Type: length

Minimum height; the element still grows to fit its content.

Type: expression

Leaves the element out where this is false.

Type: keyword

Overrides the default structure role (text → P, image → Figure, …).

One of:

  • p
  • h1
  • h2
  • h3
  • h4
  • h5
  • h6
  • caption
  • note
  • figure
  • artifact: Decoration or pagination: excluded from the structure tree and screen readers.

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).

Type: text

Text template for a PDF outline entry pointing at this element.