Download a custom PDF from a form

A quote, a certificate, a purchase order: some documents need to carry the information of an instance and be handed over as a PDF. A button placed in the form generates that PDF from a template, filled in automatically with the data of the instance at hand.

Before you start

  • You need access to the process editor. The setup is done on the form, not on the instance.
  • The PDF template works like email templates: if you already know how to insert an instance property into an email, you know how to do it here.
  • The PDF is always produced from an instance: it is the instance that supplies the information filling in the template.

To begin, open in the process editor the form on which the button should appear.

How to add a button to the form?

  1. Hover over the row showing the + used to add a field. Do not click the +: it adds a field, not a button.
  2. Click the cog-shaped icon on the right of the row. This is the button icon.

Result: a button appears in the form with the default text Click here.

How to set the button to download a PDF?

  1. Hover over the button to show its toolbar.
  2. Click the pencil icon to edit it.

The More options panel opens on the right.

  1. In Text, replace Click here with a label that says what the button does, for example Download the quote.
  2. If you like, choose an Icon.
  3. In Action, choose Download PDF from template.

Result: the Select the template field appears under the action. It is what determines the content of the PDF.

How to choose or create the PDF template?

In Select the template, you have two options:

ChoiceWhat it means
Pick a template from the listYou reuse a template that already exists in your environment. You can edit it straight from this panel.
Click the +You create a new template, which joins the list of templates in the environment.

To create a template:

  1. Click the + on the right of Select the template.
  2. In the New template window, enter a Name. It is required, and it is the name under which the template will be offered to other buttons.
  3. Write the document in the editor, with the usual formatting tools: headings, bold, lists, tables, images.
  4. For finer control over the layout, click the </> code view icon and write the document directly in HTML.
  5. Click Confirm.

Result: the template is saved and selected for the button.

Tip: HTML mode is the surest way to get a PDF that matches your brand guidelines — margins, aligned tables, a positioned logo. The visual editor is enough for a simple document.

How to insert instance information into the template?

A fixed template always produces the same document. To have it show the customer, the amount or the date of the instance, insert its properties into the text.

  1. Place the cursor where the information should appear.
  2. Type : (colon).
  3. Choose the instance property to display.

Result: on every download, the property is replaced by its value in the instance from which the button is clicked.

How to name the downloaded file?

Back in the button options, you can set the name of the PDF file. This is the name under which the person will find it in their downloads.

  1. Enter the file name.
  2. To add information specific to the instance, type : and choose the property — just as in the template.
  3. Click Confirm to save the form.

A name that includes an instance property, such as a case number or the customer name, keeps every downloaded file from carrying the same name.

What happens when someone clicks the button?

Once the form is saved, start an instance of the process and open the form.

  1. Click the button.

Result: the system immediately downloads the PDF file, built from the template and filled in with the information of this instance. Two different instances therefore give two different PDFs from the same button.

Was this article helpful?

Related Articles