---
title: "Renders (possibly unsaved) editor sections through the real production
pipeline — sample data, regional compliance blocks, QuestPDF — and
returns one PNG per page. More than one page on a fixed-size label
format means the content overflows the label."
method: POST
path: "/templates/render-preview"
tags: ["Templates"]
---

# Renders (possibly unsaved) editor sections through the real production
pipeline — sample data, regional compliance blocks, QuestPDF — and
returns one PNG per page. More than one page on a fixed-size label
format means the content overflows the label.

`POST /templates/render-preview`

## Request body

- RenderTemplatePreviewRequestDto — Request to render a live preview of (possibly unsaved) template editor state through the real production render pipeline.
  - `sections` TemplateSectionDto[]
    - `id` string
    - `type` string
    - `content` string
    - `order` union
      - integer
      - string, int32
    - `columns` TemplateSectionDto[], nullable
    - `widthPercent` union
      - number, double
      - string, double
  - `format` string, nullable — Physical output format, e.g. "bottle-label". Null falls back to the default.
  - `type` string, nullable — Template type, e.g. "labels". For labels the preview includes the region-mandated compliance blocks appended at print time.

## Response `200`

OK

- TemplatePreviewResultDto — Server-rendered template preview: one PNG per output page plus the physical page dimensions. More than one page on a fixed-size label format means the content overflows the label.
  - `pages` string[] — Base64-encoded PNG per rendered page.
  - `pageCount` union
    - integer
    - string, int32
  - `widthMm` union
    - number, float
    - string, float
  - `heightMm` union
    - number, float
    - string, float
  - `dpi` union
    - integer
    - string, int32

---

[API](https://skmtc.net/clinicos/apis/pawthosx-business-api-v1.md) · [All operations](https://skmtc.net/clinicos/apis/pawthosx-business-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/clinicos/pawthosx-business-api-v1/revisions/e7d381a5453b/schema)
