PDF layers (also known as “Optional Content Groups”) are defined in the template definition:

<layers>
  <layer name="Barcode" />
  <layer name="Cutmarks" visibility="fulfillment" separate-file="true" />
</layers>

The only required attribute of the <layer> element is name.

The <layer> element supports these additional attributes:

Once the layers are defined in the template definition, you can assign elements to them using the admin design tool.