Pular para o conteúdo principal

Render playground

Not yet checked on the product

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 herePlayground in the Template menu, or the Dashboard's Render playground tile.
Who can use itTenant-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 statusFrom 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​

FieldWhat it doesRequiredFormat / valuesDefaultValidation messages
One box per keyThe value printed in place of that placeholder.NoText, printed as typedEmpty—
API keyA 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.YesThe key as issuedEmptyAPI key required
Use cacheReuse 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.NoOn / offOff—

A box left empty prints as empty.

Buttons and actions​

ButtonWhat happensWhoReversible?
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).

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​

MessageCauseWhat to do
API key requiredAPI key is empty.Enter a production API key.
invalid tenant api keyThe key is revoked, unknown or not a production key.Check the key.
render endpoint requires an approved origin or internal service tokenThe 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 serviceThe 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 429More than 10 renders a minute with the same key.Wait a minute.
Pick a template is emptyNo 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 versionThe template has only drafts.Publish a version.

Example — from a .docx to a generated PDF​

  1. Write the document. In Word, write a short letter with three placeholders: nome, valor and data, 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}}.
  2. Create the template. Templates › + New template, Name Carta de aprovação, Save. Cogneris gives it the code carta-de-aprovacao (Create a template).

  3. Upload the .docx. Drop the file on Drop a .docx file or click to choose. Version 1 uploaded; Keys detected (3) lists data, nome and valor (Upload a version).

  4. Publish it. Publish this version on v1. Version published (Versions and publishing).

  5. 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.

  6. For a Workflow process, bind each key on Field sources — for example nome to a field of the identity document, data to Data de hoje — and put the code carta-de-aprovacao in the Generate document phase.

  7. 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.


Last reviewed 2026-10-22 · Version 1.0.0 · Owner: product-documentation