Generate a dynamic PDF from a calculator
To generate a PDF that pulls values from a calculator or host app, publish the document first, add a Formula component for each value you want to fill in, and trigger the Generate document action from a button. A document has no input form of its own — its dynamic values come from the Site or Embed that generates it, which sends its current state to the document at runtime.
Publish the document first
A document must be published before it can be generated. If the document you select is still a draft, the action shows Can't generate this document while it's a draft. Activate it first. Publish the document before you wire up the action.
Add the values to pull in with a Formula component
Add a Formula component to the document for each value the PDF should show. The reference you enter must match the name in your calculator or host app — for example NAME or TOTAL_PRICE — or the value won't populate.
In the document builder, add a Formula component where the value should appear.
In the Formula property, enter the reference name from your calculator or host app, such as
NAMEorTOTAL_PRICE.Add another Formula component for each value the PDF should pull in.
For more complex expressions, see Advanced FormulaScript.
Trigger the Generate document action
Add a Button to your Site or Embed and configure its click action to Generate document.
Select the button and open its actions.
Add the Generate document action.
Choose the document to generate from the Document dropdown.
Optionally set a Filename; leave it empty to use the page's title.
What happens when a visitor generates the PDF
When a visitor clicks the button, ConvertSite renders the document in a hidden frame, sends the current calculator state to it, and downloads the finished PDF. The PDF uses your Filename, or the page's title if you left the field empty.
Generate document vs Print to PDF
Print to PDF is a separate action that makes a PDF snapshot of the current page or embed. It is not a document builder flow and does not use a document. Use Generate document when you want a document that pulls in calculator values.
Limits and error messages
Draft document: the action shows Can't generate this document while it's a draft. Activate it first.
Timeout: generation can time out after 60 seconds with Document generation timed out.
Missing published page: generation fails if the published document page can't be found.
Inactive subscription: generation fails if the subscription is inactive.