Skip to content

Design a PDF template

How-to8 minPractitioner

Before you start

A PDF template is a document you write inside Beezr, like a page in a word processor. Fields from a module go in as chips, a table repeats for each line, and the workflow turns the result into a PDF attached to the record. Use it when the document is final and you want to design it inside Beezr.

  1. In the left rail, click Document generation, then New template.
  2. Choose PDF, type the Name, for example Purchase order, and choose the Module. Click Continue.
  3. In the Design view, type like a normal document. Beezr starts you with a title and the module’s first fields.
  4. In the Fields tab on the right, click a field to add it where your cursor is.
  5. Click Save.
A PDF template in the Design view: a formatting toolbar, a document with field chips and a repeating table, and the Fields tab on the right.
    Design, Code and Preview switch the view.
    The toolbar sets the text style, bold, italic, underline, alignment, lists, tables and a divider line.
    Chips are fields of the module. A highlighted table row repeats for each line.
    The Fields tab lists the module’s fields. Click one to insert it.

The toolbar’s text style menu offers Normal text, Title, Heading and Subheading. A key under the sheet explains the colours: fields From the record, rows that Repeat for each line, and Custom, set in the workflow step.

When the module has line items, the toolbar shows an Add button for them, such as Add lines table. The Fields tab has the same, under the line items’ name. The table has one highlighted row that repeats for each line. Click a line field in the Fields tab while your cursor is in that row to add a column or a value.

Click Preview. Beezr renders the PDF with the same engine a workflow uses. Fields show their labels, and a repeating table shows 3 sample rows, so you can check spacing and page breaks before any record exists. Errors appear in place of the PDF.

At the bottom of the page, Placeholders in this template lists every placeholder. Chips that belong to the module look normal. Custom ones are values you set in the workflow step.

Use Code for anything beyond fields and one repeating table, such as a condition. The syntax panel there shows:

  • ${customer_name} prints a value. An empty value prints nothing.
  • <#list lines as row> … </#list> repeats for each record. Read a field with ${row.propertyValueMap.qty}.

A template with logic like <#if> opens in Code. Preview shows the result.

Add a Smart document step on the same module, choose the template and fill in each placeholder. Write some content on the page before you save. Smart document covers the step.

A PDF template tied to a module, designed in Beezr. A workflow fills it from a record and attaches the PDF to that record.

Check yourself

Karim needs a paragraph that appears only for orders above a limit. Which view can he use?
Show the answer

Code. Use the Code view for conditions such as `<#if>`. A template with conditions opens in Code.

What does Preview show for a field in a PDF template?
Show the answer

The field's label, with three sample rows for a repeating table. Preview fills fields with their labels and a repeating table with three sample rows, so you can check the layout.

What's next

Last checked