PDF Template Editing
The PDF Template Editor provides a complete workflow for generating dynamic documents by connecting a visual layout with your application's logic. In the Template Editor, you design a template by placing dynamic placeholders onto an uploaded PDF background. Each template you create is generated as a unique Instance within the PDF Templates Class. This instance holds the fillTemplate
function, which you then use to merge your live data with the layout, generating a finished PDF document for an end-user.
Creating Your First Template
To begin, select Template Editing mode from the main toolbar. This will open the editor panel, where you will manage your templates.
The first time you open the editor, you will immediately be presented with a form to create your first template.
Enter a unique Name for your template in the form.
Choose a standard page size from
A4
,A5
, orLetter
.Click Create Template.

The Editor Interface
After your first template is created, the main editor interface becomes visible. Its toolbar provides the core controls for building your layout:
The add page icon [] adds a new page to the currently selected template.
The delete page icon [] icon deletes the currently selected page.
The add text placeholder icon [] adds a text placeholder to the template.
The add image placeholder icon [] adds an image placeholder to the template.

The add template icon [], located next to your current template's name, allows you to create additional templates.
Creating this template container also automatically generates a corresponding Instance inside the PDF Templates class. This instance contains the fillTemplate
function, which you will use later to feed data into your layout. You are now ready to design that layout.
Designing the Template Layout
Managing Pages and Backgrounds
To use an existing document as a layout, you must first upload each page of that document as a separate PDF file to the File Server.
In the Template Editor, add a blank page for each page of your source document. Then, to set the background, drag each page-file from the File Server onto the corresponding blank page in the editor. This process sets the file as a static background for your placeholders.
Once a page is created, you can right-click on it to open a context menu. This menu provides options to change the page order (Move Up, Move Down) and manage the layering of elements (Bring to Front, Send to Back).
To delete a page, select it and click the Delete Page icon in the toolbar.
Placing and Configuring Placeholders
To add dynamic content, click the Add Text Placeholder or Add Image Placeholder icon in the toolbar, and then click on the page where you want to place it.
To configure a placeholder, select it on the canvas and click the gear icon in the toolbar. This opens the settings where you must provide a Variable Name.

Styling Placeholders
You can customize the appearance of your placeholders.
For Text Placeholders, you can change the Font, Font Size, Line Height, Text Color, and Background Color. You can also resize the placeholder's bounding box.
For Image Placeholders, you can only define the Variable Name and resize the placeholder's container. The size of this container will determine the size of the final image on the document.
Deleting a Template
If you no longer need a PDF template, you can permanently remove it and its associated function from your application.
Navigate to the Functionality Panel in the App Builder.
Open the PDF Templates Class to view all your created template instances.
Right-click on the template instance you wish to delete.
Select Remove from the context menu.

This action is irreversible. Deleting a template instance will permanently remove it from both the Functionality Panel and the Template Editor. Any logic in your Flow Builder that references this template will break.
Populating the Template
To populate the template with live data, you use the fillTemplate
function in your backend logic. This function is held within the template's corresponding instance, which is located inside the PDF Templates class in the Functionality Panel.
The function is the engine that brings your PDF to life. During runtime, it takes a data object (e.g., a JSON object from a database) as input, merges its values with the placeholders in your template layout, and outputs a finished, populated PDF document.
For a detailed guide on how to use this function, including its specific inputs and outputs, please refer to the main PDF Templates class documentation.
Full Tutorial
To see all these concepts in action, follow our complete step-by-step guide where we build a dynamic acceptance report from start to finish.
Last updated