Skip to content

PDF templates

PDF templates can be used as attachments in e-mails. PDF templates have the advantage that it is possible to control the template design precisely. However, this comes at a price. PDF templates have some limitations:

  • Checkboxes are currently not supported
  • Only PDFs of type acroform can be used
  • No support for rendering images/attachments
  • No support for rendering QR codes
  • No support for signatures

Creating a PDF template

Please take the following steps to create a PDF template:

  1. Go to Settings.
  2. Click on a Templates
  3. Click on New.
  4. Enter the label and the name of the status in the Label and Name fields respectively. If you enter a label and press Tab, BizzStream will automatically propose a name. The name has to be unique within the environment.
  5. Ensure that the Purpose field has the value Document.
  6. Choose a document definition in the Document Definition field.
  7. Set the Locale.
  8. In the field Based On, choose for HTML.
  9. Click Ok for saving the new template.

Preparing a PDF file

To prepare a PDF for serving as a template please take the following steps: 1. Create a PDF of the type acroform (xfa is currently not supported). 2. Use BizzStream Expressions to create the correct reference to fields and lines. 3. Upload the PDF file to BizzStream.

Add fields

Fields in the PDF files have names that act as placeholders. When you want to fill a form element with a value from the document element, use a placeholder. This placeholder may contain formatting expressions. For instance:

{!orderDate{"format":"MMM Do YY"}!}

is filled with a value "Apr 6th 16" if the orderDate field has value 2016-04-06.

Add lines

For adding lines please use the following syntax:

{!<lineName>.<fieldName>{"index": <lineNumber(0 based)>}!}

So if you have a line named 'orderLines', and a field named 'quantity', you can render the quantity of the first 3 lines as follows:

{!orderLines.quantity{"index": 0}!}
{!orderLines.quantity{"index": 1}!}
{!orderLines.quantity{"index": 2}!}

Note that for each repeat of a line you need to add an index, this is not the case for HTML templates.