PDF Templates
The PDF Template Editor is a powerful tool that allows users to create customizable, fillable PDF templates. With this feature, you can create forms, reports and other structured documents by adding dynamic data fields that can be programmatically populated for any number of app users.
The PDF documents can also be created starting from a user-updated base document. This feature is ideal for digitizing and automating existing forms that require a specific standardized format.
Creating a template
The Template Editor is accessed from the "Template Editing" button on the left of the toolbar.

It will open on the right of the screen in place of the UI Editor.
If there are no templates in the app yet, the editor opens with the template creation dialog, where you can pick a name and format.
The template is initially empty. You can add a page by clicking on the ➕ icon under the template name.
Adding Fields
Once the template has at least one page, you can add fields using the Add Text Variable
and Add Image Variable
buttons in the editor.


Image variables
Image variables allow you to add image inputs (for example from a photo widget or a signature) as fields in the template.
Filling the template
Once you create a template, a new instance is created as well in the Function panel, under
Template > PDF Templates > [Template Name]
. This instance contais the Fill Template
function.

Filling an existing PDF
After adding at least one page to the template, drag a file from the Media Server onto it.

Then, add the fields and drag them to the desired location on the form.
In the example below, the app collects the input data from a form and uses it to fill the template. The result is the uploaded document, fully filled with the new user data.

The output of the fillTemplate
function is a Base64 encoded document.
It can be dragged onto a Media View widget to display the most up to date version, or it can be sent as an attachment in an e-mail.
It's important to note that each output of a fillTemplate function is a separate document isolated for each user, and all fields are completely overwritten when the function runs.
Last updated