Generate documents and export data with click actions
Print to PDF, Generate document, and Export to CSV are click actions that give your visitor a file: a PDF of the page, a PDF you built in the document builder, or a CSV download. You add all three the same way, from the click action group of an element such as a Button, Box, Link, or Image.
Add one of these actions
Select the element on the canvas.
In the inspector, open its click action group, for example Button click action.
Click Add an action.
Pick the action in the picker.
Print to PDF
Print to PDF prints the page to a PDF file when the visitor clicks. The action has two fields:
Filename: the name of the downloaded PDF. Leave it empty to use the page's title.
Hide this button triggering the print action in the PDF: a toggle that keeps the button itself out of the printed PDF.
Generate document
Generate document downloads a PDF you built in the document builder. Only workspace admins see this action in the picker: non-admins cannot add it, and an existing Generate document action is hidden from them.
The action has two fields:
Document: a dropdown to pick the document. It shows Select a document until you choose one.
Filename: the name of the downloaded PDF. Leave it empty to use the page's title.
You build and activate the document in the document builder before you wire up the action. See Create and publish a PDF document for the steps, and How the document builder works for how documents are put together.
The document you select cannot be a draft. If it is, the panel shows Can't generate this document while it's a draft. Activate it first. The other document limits and error messages are listed in Document formats, limits, and error messages.
To fill the PDF with live values from a calculator, use a dynamic document; the walkthrough is in Generate a dynamic PDF from a calculator.
Export to CSV
Export to CSV downloads a data source as a CSV file when the visitor clicks. The action has three fields:
Data source: a formula that produces the data to export. The action fails when this formula is empty.
Filename: the name of the downloaded file. Enter it without the .csv extension; the download always ends in .csv. Leave it empty and the file downloads as export.csv.
Delimiter: Comma (,), Semicolon (;), or Tab. New actions start on Comma (,).