Experience - Pdf - Create
Type identifier:
experience:pdf:createCategory: Flow Operations
Description
Renders a published Experience with the app target in headless Chromium using print media mode, then creates and uploads a PDF file. The node emits the created PDF as a file handle for downstream nodes.
Input Handles
Handle | Data Type | Required | Description |
|---|---|---|---|
|
| Yes | Execution trigger input. |
| varies | No | Dynamic handles for configured datum inputs. |
Input Handle Details
trigger
- Type:
trigger - Notes: Starts PDF generation when received.
Dynamic Datum Input Handles
- Type: generated from configured datum references
Notes:
- Handles are generated when
datumInputsare configured. - Each handle id is the configured input value key.
- Handles are generated when
Output Handles
Handle | Data Type | Description |
|---|---|---|
|
| Emitted after PDF generation and upload succeed. |
|
| Emitted when rendering or upload fails. |
|
| The generated PDF file entry. |
Output Handle Details
file
- Type: file entry with Flow context
Notes:
mimeTypeIdispdf
Configuration Options
Property | Type | Required | Default | Description |
|---|---|---|---|---|
|
| Yes |
| Display label for the node. |
|
| Yes* | - | Experience to render. |
|
| No | canonical endpoint | App endpoint selection. |
| datum inputs | No | - | Datum values to include in generated Experience URL. |
|
| No |
| Output filename. |
|
| No |
| PDF page format. |
|
| No |
| PDF orientation. |
|
| No | - | Top page margin CSS size (for example |
|
| No | - | Right page margin CSS size. |
|
| No | - | Bottom page margin CSS size. |
|
| No | - | Left page margin CSS size. |
|
| No |
| Include background graphics/colours in output. |
|
| No | - | Render scale from |
|
| No |
| Enable Chromium header/footer templates. |
|
| No | - | Block id to render into the PDF header template. |
|
| No | - | Block id to render into the PDF footer template. |
|
| No |
| Timeout in seconds ( |
* Required to run; a missing value takes the error path.
Behaviour
Execution Flow
- Validates that
experienceIdresolves to a published Experience path. - Resolves configured datum inputs.
Establishes render authentication:
- If the run context includes a user-backed Space identity for the Flow's Space (such as the built-in
USERandADMINroles for a signed-in Ligantic user), the Experience is rendered via cloud as that user, so the Experience does not need to be publicly accessible. - Otherwise (no identity, an identity for a different Space, or an identity not backed by a user, such as a guest or magic-link session), the Space must have a guest authentication strategy, and the app endpoint Experience is rendered anonymously.
- If the run context includes a user-backed Space identity for the Flow's Space (such as the built-in
- Renders the page in print media mode, waits for the page to load (waiting for network idle is best-effort), then waits for the Experience's data to finish loading, and produces the PDF. If the data has not finished loading within
timeoutSeconds, the node logs a warning and produces the PDF anyway. Queries with Live Query enabled are not waited for, so their results may be missing from the PDF. - Saves the PDF and emits the resulting file entry on
file. - Emits
successon completion orerroron failure.
Authentication and Prerequisites
One of the following must hold:
- the run context carries a user-backed Space identity for the Flow's Space (for example, a Flow triggered by a signed-in Ligantic user with the built-in
USERorADMINrole) — rendered via cloud, or - the Space has a guest authentication strategy — rendered anonymously via the app endpoint.
- the run context carries a user-backed Space identity for the Flow's Space (for example, a Flow triggered by a signed-in Ligantic user with the built-in
- The rendering session is subject to normal Experience access control: the identity's role must grant access to the target Experience, otherwise the render returns not-found and the node fails. Built-in
USER/ADMINroles can access any Experience in the Space via cloud.
Header and Footer Blocks
When displayHeaderFooter is enabled, headerBlockId and footerBlockId select blocks from the experience that are rendered into Chromium header/footer templates. Template classes like pageNumber/totalPages/date/title are not injected automatically by this node.
Examples
Basic PDF Export
{
"type": "experience:pdf:create",
"data": {
"label": "Experience - Pdf - Create",
"experienceId": "exp_1234567890abcdef123456",
"format": "A4",
"orientation": "portrait",
"printBackground": true,
"timeoutSeconds": 30
}
}PDF Export With Margins and Footer
{
"type": "experience:pdf:create",
"data": {
"label": "Invoice PDF",
"experienceId": "exp_1234567890abcdef123456",
"fileName": "invoice.pdf",
"format": "Letter",
"orientation": "portrait",
"margin": {
"top": "12mm",
"right": "10mm",
"bottom": "14mm",
"left": "10mm"
},
"displayHeaderFooter": true,
"footerBlockId": "footer-block-id",
"timeoutSeconds": 45
}
}