This article is also available in:

PDF generation in Flokzu

Flokzu allows you to generate professional-looking PDF documents from your process data. This functionality combines two pieces:


  1. Print Templates: the design (format, branding, fields to display) your final document will have.
  2. PDF Generation: the different ways to produce that document — manually from the instance, automatically from the workflow, or by sending it via email.



1 - Print Templates


Print Templates are used to generate PDF documents with a custom format, using an HTML file with tags linked to the form or process data as a base. The result is a professional-looking document that respects your organization's branding.


Print Templates are a Premium feature.


What can you use them for?

They're useful when you need standardized or corporate-formatted documents, generated automatically from the data entered in the form. Typical uses:


  1. Certificates
  2. Contracts or agreements
  3. Reports
  4. Official documents
  5. Receipts, simple invoices, or proof of payment


How it works


Without a custom print template

If the process doesn't have a template associated with it, printing will generate a PDF using a default template, which includes all visible fields from the current task (including fields hidden via script, as long as they remain visible at the process configuration level).


With a custom print template

When generating the PDF, Flokzu will ask you to choose which template to use, and the document will be created with the format you defined.



How to create a Template

To create a template you use an HTML file with the structure you need. Basic HTML knowledge is recommended. If you're not familiar with this language, you can design the document in Google Docs or Excel and then convert it to HTML.


Practical shortcut

Define the structure in Excel first (no technical knowledge required), convert it to HTML using an online converter, and then adjust the necessary fields directly on that HTML. To fine-tune the final HTML document and verify it works correctly, you can use this tool.


Keep in mind that, since the template is an HTML file processed to generate a PDF, some HTML features may not be available due to security restrictions or the conversion libraries used.



Inserting form data (mustache format)

To include a field's value in the template, use "mustache" format: the field name between double curly braces {{ }}. For example, for a field called "Name":


<div>
{{Name}}
</div>


You can include as many fields as you need (visible or hidden), always using the exact field name between curly braces.


Special fields

In addition to form fields, there are predefined tags available:


Tag

Content

{{-Identifier-}}

Process instance ID

{{-Initiator-}}

Email of the user who launched the process instance

{{-Initiator_name-}}

Full name of the user who launched the process instance

{{-Initiation_date-}}

Format is yyyy/mm/dd

{{-Comments-}}

Includes all comments in that process instance


The PDF's visual layout is structured as an HTML table (rows and columns). You can also add images, logos, custom fonts, and comments.


<tr>
<td class="borderL" height="24" align="left" valign="bottom">
<font color="#000000"><br /></font>
</td>
<td colspan="2" rowspan="2" align="right" valign="middle">
<font color="#000000">Effective Date:</font>
</td>
<td class="grayBackground" rowspan="2" align="center" valign="middle" colspan="2">
<font size="3" color="#000000">{{Effective Date}}</font>
</td>
<td colspan="2" rowspan="2" align="right" valign="middle">
<font color="#000000">Reference:</font>
</td>
<td class="grayBackground" rowspan="2" align="center" valign="middle" colspan="4">
<font size="3" color="#000000">{{-Identifier-}}</font>
</td>
<td class="borderR" align="left" valign="bottom">
<font color="#000000"><br /></font>
</td>
</tr>



Linking the Template to your process

On the Settings tab of your process, go to Additional Settings → Print Template and click Add Template. In the pop-up window you'll need to:


  • Upload the HTML file.
  • Assign it an alias: this will be the name shown when printing.
  • Select the User Tasks in which the template will be available.
  • Optionally, add a description (for example, to note its purpose or version).




2. Generating the PDF document


Once your templates are defined, Flokzu offers three ways to generate the PDF: manually from the instance, automatically from the process workflow, or by sending it directly via email.


Manual generation from the instance

From any process instance, clicking the printer icon lets you generate the PDF on the spot. If several templates are enabled for that task, Flokzu will ask you to select which one (or ones) to use before generating the document.


Automatic generation from the workflow (Create PDF)

Create PDF is a type of Service Task available within Flokzu Services that lets you generate the PDF automatically while the workflow is running, with no manual intervention from the user. When you add a Create PDF service task, you can configure:


  • The templates that will be part of the PDF: the default template and/or custom templates, with the option to select several.
  • The printing order of the templates.
  • Whether the document's attachments are included in the final PDF.
  • The name of the generated PDF file.
  • The location where the file will be saved: an attachment-type field, or the document's attachments tab.


When several templates are selected, Flokzu generates a single PDF by concatenating the documents in the configured order.





Execution result

Once the process instance reaches the Create PDF task, Flokzu generates the file according to the defined configuration and saves it in the selected location. The file is linked to the process instance and can be used in later steps, for example to be sent in an electronic signature request.


If the selected attachment-type field already contains a file, its content will be overwritten.


The PDF will include the fields configured for printing. It is the process administrator's responsibility to verify that the read permissions are appropriate for the information that will be included in the document.


Generation errors: any errors during PDF generation (for example, format incompatibilities or size issues) are logged in the error monitor.


Emailing the PDF from a Send Message Task

You can also generate the PDF and send it directly by email, without needing a prior Create PDF task. To do this, in a Send Message Task:


  1. Place your cursor in the message body and press {.
  2. Select Print Template from the dropdown list.


The document will be generated using the format defined in the template and will automatically be attached as a PDF to the email being sent.





Summary

Generation method

When it happens

Requires manual action

Printer icon on the instance

On demand, at any time

Yes

Create PDF Service Task

Automatic, when reaching that step in the workflow

No

Send Message Task

Automatic, when the email is sent

No


In all three cases, the document is generated from the Print Template(s) configured for the process.

Updated on: 03/09/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!