pdg XML → PDF

Reference

Special elements

Page-furniture markers. These only mean something inside a <layout> template — they wire up the repeating frame around every page (where the flowing content lands).

<content>

special

A placeholder used inside a page template to mark where the page's flowed content goes.

No attributes.

The <layout> template is painted on every physical page; <content/> is the one spot the flowing page body lands. Everything around it (headers, footers, page numbers) repeats.

Try it — edit the source Open in Playground
<document version="2.0">
  <config><page size="A6" margin="20px" /></config>
  <layout>
    <vertical gap="8px" cross="stretch" flex="1">
      <text bold="true" font="serif" size="16">Masthead</text>
      <rect height="2px" fill="#1b1a17" />
      <content/>
      <rect height="1px" fill="#cfc8b8" />
      <text color="#8a8678" align="center"><field name="page"/></text>
    </vertical>
  </layout>
  <pages>
    <page>
      <text>The body flows in where &lt;content/&gt; sits, framed by the
        repeating template above and below.</text>
    </page>
  </pages>
</document>

<bookmark>

special

An invisible anchor that adds an entry to the PDF document outline (bookmarks).

AttributeValuesDefaultDescription
level number 1 Nesting depth; deeper levels nest under shallower ones.
title text element text The outline label.

<bookmark> draws nothing and takes no space — drop it anywhere content flows, and the reader gets an outline entry pointing at that spot. level builds the tree (a 2 nests under the preceding 1).

Example Open in Playground
<vertical gap="8px">
  <bookmark level="1" title="Introduction" />
  <text size="18" bold="true">Introduction</text>
  <text></text>
  <bookmark level="2" title="Background" />
  <text bold="true">Background</text>
</vertical>

<pagebreak>

special

Force the page to end here and continue the flow on a fresh page.

No attributes.

<pagebreak/> takes no space — it just ends the current page at that point and resumes the rest of the content on the next one. The break is a single line across the whole page: inside a horizontal or stack, every column or layer is cut at the break and continues overleaf, not just the one it sits in. A break that lands at the very top of a page is ignored, so it never leaves a blank page.

A break only works inside content that can flow onto another page. Put one inside a clipped or fixed-height box (style:clip / style:height), or inside a page template, and it has nowhere to continue — so it does nothing and the engine warns you, rather than quietly breaking the surrounding page while the box crops what overflows.

Example Open in Playground
<vertical gap="8px">
  <text size="18" bold="true">Chapter One</text>
  <text>…the first chapter runs to here…</text>
  <pagebreak/>
  <text size="18" bold="true">Chapter Two</text>
  <text>…and the next chapter starts on a fresh page.</text>
</vertical>