Documents

# Design a document template

Place text, tables, images, barcodes and fields on the page, bind them to order or trip data, preview with sample data, or let AI build the design.

Updated 4 October 2026

**Who can do this:** Permission for document templates.

The designer is where you build a document template. The page is in the middle, the toolbar is at the top and the sidebar has four tabs: **Elements**, **Properties**, **Data** and **Layers**.

## The toolbar

* **Template Name**, **Document Type** and **Entity Type** of the template.
* **Undo** and **Redo**.
* **Zoom Out** and **Zoom In**, from 25% to 200%.
* **Grid** shows a grid on the page, **Snap** makes elements snap to it.
* **Generate with AI**, **Preview** and **Save**. Saving closes the designer.

## Set up the page

1. Click an empty part of the page so that no element is selected.
2. Open the **Properties** tab.
3. Under **Page Settings**, choose the **Page Size** (A4, A5 or Letter) and the **Orientation** (**Portrait** or **Landscape**).
4. Set the **Margins** in millimetres.
5. Optionally enter the address of a background image, for example a scanned CMR form to place your fields on.

## Add elements

1. Open the **Elements** tab.
2. Click an element type, or drag it onto the page.
3. Drag the element to its place and drag its edges to resize it.
4. With the element selected, open **Properties** to set its position, style, border, opacity and the settings of that type.

| Element                  | Use                                                                                                          |
| ------------------------ | ------------------------------------------------------------------------------------------------------------ |
| **Text**                 | Fixed or data-driven text, with font, size, weight, style, colour and alignment.                             |
| **Input Field**          | A field that stays fillable in the downloaded PDF. You can set a placeholder, required and a maximum length. |
| **Link**                 | A clickable web address, which can contain data.                                                             |
| **Image**                | A logo or picture.                                                                                           |
| **Shape**, **Line**      | Rectangles, circles, ellipses and horizontal or vertical lines for boxes and dividers.                       |
| **Table**                | Rows and columns, for example the goods of a consignment.                                                    |
| **Barcode**, **QR Code** | A code built from a value such as the order number.                                                          |
| **Container**            | Groups elements that belong together.                                                                        |
| **Repeater**             | Repeats its contents for every item in a list, such as each consignment or stop.                             |
| **Conditional**          | Shows its contents only when a condition is true.                                                            |

When a **Container**, **Repeater** or **Conditional** is selected, new elements are added inside it. Use Ctrl+C and Ctrl+V (Cmd on a Mac) to copy and paste an element, and Ctrl+D to duplicate it.

## Connect elements to data

1. Select the element and open the **Data** tab.
2. Choose **Static** for fixed text, **Variable** for one data field, or **Expression** for text that mixes data, loops and conditions.
3. Under **Available Fields**, use **Search fields...** and click a field to bind it. The fields depend on the template's entity type.
4. For a list, such as consignments or goods, click a field marked (loop). This sets up a loop over that list, for example on a **Repeater**.

**Syntax Help** in the same tab shows the notation:

* **Variables**: `{{field.path}}`
* **Loops**: `{% for item in items %}...{% endfor %}`
* **Conditionals**: `{% if condition %}...{% endif %}`
* **Formatting**: `{{value | format:"date"}}`
* **Fallbacks**: `{{field.path ?? other.path ?? "default"}}`

## Arrange layers

The **Layers** tab lists every element. Click one to select it, or use the icons to duplicate or delete it. Elements inside a container, repeater or conditional are shown below their parent.

## Preview the result

1. Click **Preview**.
2. Check the page, filled with sample data.
3. Click **Edit Data** to change the **Sample Data** (JSON) and see how the template reacts, for example to long names or many goods.
4. Click **Download PDF** to test the actual PDF.

## Generate a design with AI

1. Click **Generate with AI**. The panel **Generate document template with AI** opens.
2. Optionally upload a picture or PDF of an existing document.
3. Describe what you need in **Description**, for example "Recreate this CMR waybill and bind the sender and consignee to the customer details".
4. Leave **Modify the current design (unchecked: start over)** on to change the current design, or switch it off to start over.
5. Click **Generate template** and wait while it shows **Generating...**.
6. Review the design. It is not saved yet. Fix any bindings the panel lists as not matching a field, because they would print empty.
7. Click **Save**.

## Related articles

* [Create and manage document templates](/en/help/document-templates)
* [Download a document from a template](/en/help/download-document-from-template)
* [Print CMR documents](/en/help/cmr-documents)

## Still need help?

Our support team is happy to answer any question about Transportial.

[Contact support](/en/contact)[Report an issue](/en/report-issue)

---
Canonical page: https://transportial.com/en/help/document-designer
