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:
visibility
: allowed values are on
(default), off
and fulfillment
. The fulfillment
value means that the layer is visible on files generated for production, but is toggled off in the design tool and on previews.separate-file
: allowed values are false
(default) and true
. When set to true
, the layer will be fulfilled to a separate file when generating files for production.output-name
: when outputting to a separate file, an explicit output-name
can be given. This makes it possible to combine multiple layers into the same file. The value of this attribute is accessible in liquid filename templates as {{ layer_output_name }}
. If no explicit output-name
is given, it defaults to the value of the name
attribute.Once the layers are defined in the template definition, you can assign elements to them using the admin design tool.