Render playground
This chapter was written from the product's source code and has not yet been checked by a person on a running Cogneris. If what you see on screen differs, the screen is right — please tell your Cogneris contact so the chapter can be corrected.
Render the published version of a template to PDF in the browser, with values you type, to check the layout before Workflow or your application uses it.
| How to get here | Playground in the Template menu, or the Dashboard's Render playground tile. |
| Who can use it | Tenant-management profiles can open the screen and list templates. The render itself is authorised by the API key you enter, not by your sign-in. |
| Content status | From source; not observed (template-fe ed4ab73, template-be cc0f2b0, 2026-10-22) |
The Playground calls the same public render route as your application (see overview — render API). It sends the values you type; the template's field sources are not used. Every render that is not served from the cache counts toward the tenant's monthly render quota and appears in the Dashboard's Renders (7d).
Screen layout
Render playground has three columns.
Pick a template
The templates you can render, each with its name and code. Select one with a click, Enter or Space; it is highlighted. Selecting another template clears the values you typed.
The list shows the tenant's active templates that have a published version — up to 100 of them. A template with only drafts does not appear.
Fill the values
Before you select a template: Select a template. If the template has no published version: Template has no published version.
Otherwise, one text box per key of the published version, labelled with the key, with the key between double braces as its hint. Then the API key, the cache option and the render button.
PDF preview
Before the first render: Render a template to preview the PDF here. After a render, the PDF is shown in the column, in an isolated frame. Each new render replaces it.
Fields
| Field | What it does | Required | Format / values | Default | Validation messages |
|---|---|---|---|---|---|
| One box per key | The value printed in place of that placeholder. | No | Text, printed as typed | Empty | — |
| API key | A tenant API key for the production environment; sent as the X-Xtrakt-Api-Key header. Hidden as you type, and never stored: enter it again after reloading the page. | Yes | The key as issued | Empty | API key required |
| Use cache | Reuse the PDF rendered earlier for the same version and exactly the same values (kept 30 days). A cached answer does not count toward the quota. | No | On / off | Off | — |
A box left empty prints as empty.
Buttons and actions
| Button | What happens | Who | Reversible? |
|---|---|---|---|
| Render PDF (… while rendering) | Renders the published version with the typed values and shows the PDF. Under the button: Rendered in … ms and Cache hit or Fresh render. | Anyone with a valid production API key, from a browser address the environment allows | — |
To keep the PDF, use the viewer's own controls in the preview frame (what they offer depends on your browser).
Shared preview link
The Playground has no shared or public preview link. The interface carries text for a shared read-only preview (Preview shared template), but no screen of this version shows it.
Common problems
| Message | Cause | What to do |
|---|---|---|
| API key required | API key is empty. | Enter a production API key. |
| invalid tenant api key | The key is revoked, unknown or not a production key. | Check the key. |
| render endpoint requires an approved origin or internal service token | The environment does not allow renders from this browser address. Browser renders are off unless the environment allow-lists the address. | Render from your application instead, or ask your administrator whether browser renders can be enabled in this environment. |
| Another message from the service | The service refused the render — for example the month's quota is used up, the template has no published version, or the published .docx is larger than 25 MB. The message shown is the service's own reason. | Act on the reason; check the template's page and the quota. |
| An error naming status code 429 | More than 10 renders a minute with the same key. | Wait a minute. |
| Pick a template is empty | No active template of the tenant has a published version. If the list could not be loaded, an error message with the service's reason is shown as well. | Publish a version on the template page. |
| Template has no published version | The template has only drafts. | Publish a version. |
Example — from a .docx to a generated PDF
-
Write the document. In Word, write a short letter with three placeholders:
nome,valoranddata, each between double braces (see Placeholder syntax). The Word add-in can insert them for you from the list of fields your processes supply.Prezado(a) {{nome}},O valor aprovado é {{valor}}, em {{data}}. -
Create the template. Templates › + New template, Name Carta de aprovação, Save. Cogneris gives it the code
carta-de-aprovacao(Create a template). -
Upload the .docx. Drop the file on Drop a .docx file or click to choose. Version 1 uploaded; Keys detected (3) lists
data,nomeandvalor(Upload a version). -
Publish it. Publish this version on v1. Version published (Versions and publishing).
-
Render it here. Playground › select Carta de aprovação. Type a name, a value and a date, enter a production API key, select Render PDF. The PDF appears in PDF preview.
-
For a Workflow process, bind each key on Field sources — for example
nometo a field of the identity document,datato Data de hoje — and put the codecarta-de-aprovacaoin the Generate document phase. -
To change the letter, upload a new version, try it here, and publish it when ready. The code does not change, so the Workflow phase and your application keep working.
Related
Last reviewed 2026-10-22 · Version 1.0.0 · Owner: product-documentation