Skip to main content

composition:only_static

YAML/jq planner: fixed list + transform + conditional + skipped item.

Composition — merges multiple templates into one PDF. Browse this template in the repository →

The PDFs below are rendered live by PDF Server from the shipped examples.

10

Your browser can’t display this PDF inline — use the download link below.

Download PDF — composition:only_static / 10

Inputs

Render data

10

examples/10.json

{
"iterations": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10
],
"embedded": {
"value": "Embedded"
},
"value": "Testing"
}

Data schema

schema.json

{
"type": "object",
"properties": {
"value": {
"type": "string"
},
"embedded": {
"type": "object",
"properties": {
"value": {
"type": "string"
}
}
},
"iterations": {
"type": "array",
"items": {
"type": "number"
}
}
}
}

Template

composition.yaml

templates:
- templateName: static_template
- templateName: mustache_template
- templateName: simple_raw
- templateName: lorem-ipsum
if:
jq: '.iterations | length > 0'
- templateName: mustache_template
transform:
jq: '.embedded'

# Should never be rendered
- templateName: static_template
if:
jq: 'false'