Skip to main content
Share:
Link is copied

Manage Custom PDF Templates

info

Information on this page concerns working with custom PDF templates in the First Generation Reporting system.

In the New Generation Reports system, only Company Admins can customize PDF templates.

For details about PDF templates in the Next Generation Reporting system, see section Next Generation Reporting > Working with PDF Templates.

You can generate alarm reports and event log reports in PDF format using custom PDF templates.
Custom templates enable you to use dynamic content in PDF reports. Placeholders and variables that you can include in the template are referenced in the report to display the corresponding output.

You can also format and personalize PDF reports, for example, by inserting your Company logo or signature in the template.

Only Administrator and Manager can configure custom PDF templates.

Operations with Custom PDF Templates

To configure custom PDF templates, go to Company > Settings > Reports.

On the Custom PDF Templates page, you can manage templates for two types of PDF reports:

  • event log reports
  • alarm reports

You can manage the custom PDF templates as follows:

  • to create a new custom PDF template, click the add Add Template button next to the respective type of report

    In the Custom PDF Template dialog box that opens, you can view the settings of the default template. Customize the template as needed and click Submit to save the changes. For more information about customizing PDF templates, see section Customize PDF Templates below.

  • to activate a custom PDF template for the selected type of report, set the toggle bar to the active position

    To disable the custom PDF template and use a default PDF template, set the toggle bar to the inactive position.

  • to edit a template, click the edit Edit Template button

    In the Custom PDF Template dialog box that opens, edit the template and click Submit to save the changes.

  • to test a template, click the bug_reportTest Template button

    A webpage with the report preview opens in the new tab. The report preview is generated using the latest event log / alarm on the Company level.

  • to delete a template, click the deleteDelete Template button

    In the Delete PDF Template dialog box that opens, enter the confirmation code and click Confirm Delete.

Customize PDF Templates

In a PDF template, you can customize the email subject and body text that are used in reports distributed by email, and the PDF file.

For customizing a PDF template, you can use the following:

  • plain text

  • predefined template placeholders

  • Pebble template variables

    Variables are containers for dynamically generated report data. Variables are included in the report using Pebble template syntax. For more information about Pebble syntax, go to the Pebble official website or click the Template syntax link in the Custom PDF Template dialog box.

  • HTML tags

    Use HTML tags to arrange and format the content of the report. For example, using HTML syntax, you can insert formatted text, images, tables, or hyperlinks in the report template.

tip

When you include an image in the report template, make sure it is publicly available. Images from a private network cannot be displayed in the report.

To customize a PDF template for the report:

  1. Go to Company > Settings > Reports

  2. On the Custom PDF Templates page, select a template or create a new one

  3. In the Custom PDF Template dialog box that opens, configure the content of the email and the attached PDF file:

    • in the Email Subject Template (Optional) field, enter a custom email subject, or leave it blank to use the default subject title

    • in the Email Text Template (Optional) define the email body content, or leave it blank to use the default message

    • in the PDF Template field, define the content of the PDF report

      By default, the PDF Template field contains the following:

      • a list of placeholders for the report output

        You can define the output that should be generated in the report by adding or deleting the placeholders provided in the list. The list of placeholders is automatically replaced in the report with the corresponding values. For example, the <workflow-steps-report></workflow-steps-report> placeholder is replaced in a report with the corresponding workflow tree.

      • a list of variables available for rendering in the report

        To view the list of variables with properties in JSON format, click the bug_report Test Template button for the respective PDF template. You can customize the list by adding or deleting variables with properties using Pebble syntax.

  1. Click Submit to save the changes

Examples of PDF Templates Customization

Custom PDF templates support all Pebble-specific features, including variables, tags, filters, and logical operators.

The basic examples below show how Pebble syntax can be used for customizing PDF report templates:

  • to include a variable in any field of the report template, use double curly braces: {{alarmCode}}

    The variable accesses the value from the alarm details and displays it.

    Use a dot to specify the property of a variable, for example {{device.testMode}}.

    For example, the expression Alarm {{alarm.alarmCode}} {{alarm.alarmType}} from {{device.evalinkDeviceId}} in the Email Subject Template field, is displayed in the Email subject of a particular report as follows: Alarm 312 TECHNICAL from Geneva Office.

  • you can use Pebble tags to perform operations with variables included in a template

    For example, the if tag tests a condition and allows you to display the content selectively. You can specify alternative conditions with elseif tag, or set multiple conditions using and and or tags.

    In the example below tags are used to define the template header based on the alarm type.

    <h1>
    {% if alarm.alarmType == 'BURGLARY' %} Burglary alarm
    {% elseif alarm.alarmType == 'FIRE' %} Fire alarm
    {% else %} Alarm
    {% endif %}
    </h1>

    You can use a specific logo for a particular entity within the Company as provided in the following example:

    {% set SpecialGroupId = <id> %}

    {% if device.deviceGroupId == SpecialGroupId %}
    <img src="https://link-for-custom-logo/logo.png">
    {% else %}
    <logo></logo>
    {% endif %}
  • to modify the template output, you can use Pebble filters

    Filters are separated from the variable using the pipe symbol | and can take arguments.

    For example, the length filter returns the number of items in the expression. The {{myContactList.responder.name | length}} expression returns the number of responders from the site Contact List.

    The date filter allows to return a timestamp in human-readable dd.MM.YYYY HH:mm:ss format. The {{alarm.timestamp | date }} expression returns, for example, 20.05.2022 09:56:42. A timestamp without the filter is displayed in UNIX format: for example, 1653033402664.

Was this page helpful?