# Generate a presentation PDF from JSON

Create a presentation from JSON with Tembuilder Product Story. Add the template, connect slide content to parameters, preview, publish and download your PDF.

## Before you start
This guide uses **Tembuilder Product Story**, a 4:3 slide template, as an example of creating a presentation from JSON and exporting it as a PDF. For documents intended for printing, choose a template with a suitable paper size such as **A4 or A5**. You will add the example template to your project, connect the cover to JSON data, then preview and render the slides. Sign in to Tembuilder and have a workspace and project ready.

## 1. Use the presentation template
Open <a href="/templates/tembuilder-product-story/" target="_blank" rel="noopener noreferrer">Tembuilder Product Story</a> and click **Use this template** below the template details. Sign in if prompted. In the app, choose the destination workspace and project, enter a template name and slug when prompted, then confirm to add it. Open your copy in **Templates** if the editor does not open automatically.

<figure class="doc-sim"><img src="/docs/examples/product-story-cover.webp" alt="Tembuilder Product Story · 4:3 presentation cover" width="1200" height="900" style="display:block;width:100%;height:auto" /><figcaption>Tembuilder Product Story · 4:3 presentation cover</figcaption></figure>

## 2. Connect the cover to JSON
This template starts with slide content stored in **Props** and no declared Parameters. Add two **Text** fields in **Parameters → Schema**: `presentationTitle` with default `My product presentation`, and `presentationSubtitle` with default `From idea to launch`. Keep these field names exactly as shown.

In **Structure**, select the cover section and open **HTML**. Replace `{{ props.title }}` with `{{ params.presentationTitle }}` and `{{ props.subtitle }}` with `{{ params.presentationSubtitle }}`. Keep the surrounding HTML and CSS. The cover content should read:

Select the base variant **English** for this example so the section’s HTML can be edited.

```html
<section class="ed cover" lang="{{ global.props.localeCode }}">
  <div class="cover-center">
    <h1>{{ params.presentationTitle }}</h1>
    <p>{{ params.presentationSubtitle }}</p>
  </div>
</section>
```

<figure class="doc-sim" aria-label="Cover section · HTML connected to Parameters"><div class="sim-location"><span>Structure → Cover → HTML</span><span>TEMBUILDER</span></div><div class="sim-stage"><div class="sim-tabs"><span class="sim-active">HTML</span><span>CSS</span><span>Props</span><span>Config</span></div><div class="sim-code"><code>&lt;h1&gt;{{ params.presentationTitle }}&lt;/h1&gt;</code><code>&lt;p&gt;{{ params.presentationSubtitle }}&lt;/p&gt;</code></div></div><figcaption>Cover section · HTML connected to Parameters</figcaption></figure>

Open **Parameters → Payload** to inspect the JSON shape. Use this data when you reach **Run**:

```json
{
  "presentationTitle": "My product presentation",
  "presentationSubtitle": "From idea to launch"
}
```

These are the two fields you just added. Other slides still use their existing Props; edit those in **Structure → Props**, or connect more content to Parameters using the same approach. See [Declare input data](/docs/data/parameters/) for field settings.

## 3. Save and preview the slides
**Layout** reflects your current design edits. **Save** before opening **PDF**: PDF preview uses saved template content and the editor’s parameter values, initially populated from defaults. After another edit, save and regenerate the preview. Preview does not consume render quota. Keep the paper size **Slide 4:3** for this design.

Preview values and **Run** inputs are separate. Changing Run JSON affects that render job; it does not update an existing PDF preview. Use the presentation control beside the expanded PDF preview to view the pages as slides. See [Present PDF and slides](/docs/editor/presentation/) for controls.

## 4. Publish and render from JSON
1. **Save** your changes and **publish** the intended version.
2. Create a project API key with `template:render` permission if needed.
3. Open **Run**, choose that key, the published version and the variant you edited.
4. Enter the JSON above in Run’s data input and click **Render**.
5. Wait for success, then open the result in **Run** or **Renders** and download the PDF.

<figure class="doc-sim" aria-label="Publish → Run → Render the presentation"><div class="sim-location"><span>Editor / Publish → Run</span><span>TEMBUILDER</span></div><div class="sim-stage"><div class="sim-publish-bar"><strong>Tembuilder Product Story</strong><div class="sim-actions"><span class="sim-control">Save</span><span class="sim-control sim-dark">Publish</span></div></div><div class="sim-run"><div class="sim-panel-title">Run · v1 · English</div><div class="sim-run-body"><div class="sim-code"><code>{ "presentationTitle": "My product presentation",</code><code>  "presentationSubtitle": "From idea to launch" }</code></div><div class="sim-render-footer"><span class="sim-control sim-dark sim-focus">Render</span></div></div></div></div><figcaption>Publish → Run → Render the presentation</figcaption></figure>

Real renders require a published version. Each successful render consumes quota. When integrating through the API, put the JSON object inside `parameters`; see the [render reference](/docs/developers/render-reference/).

## 5. Check your presentation
Confirm the cover shows “My product presentation” and “From idea to launch”. Change the two JSON values and render again to verify that the cover changes while the remaining slide layouts stay intact. Check the first and last slides, text overflow, images and page size in the downloaded PDF. If a job fails, inspect its error before retrying; see [common errors](/docs/help/common-errors/).
