back to knowledgebase

Can I customise PDFs which are produced in OpenCRM?

Updated: 14 February 2020 14:45:16 OpenCRM::Quotes OpenCRM::Orders::Sales Orders OpenCRM::Orders::Purchase Orders OpenCRM::Invoice OpenCRM::Projects OpenCRM::Helpdesk OpenCRM::Settings OpenCRM::Settings::Templates OpenCRM::Settings::Additional

OpenCRM allows administrators to customise PDF templates, and set up multiple custom PDF templates for certain parts of the system.  These templates can be set up for quote, sales order, purchase order, invoice, helpdesk and project PDFs as well as despatch notes.

Some systems may need these custom PDF templates enabling, which can be done by a system administrator from the "Additional Settings" section of OpenCRM.

The custom template PDFs can be enabled on a PDF by PDF basis, so you can turn some of them on, and leave the others to be the system defaults.  Similarly, they can be turned off at any time, and the system will automatically revert to using the defaults.

To enable the custom PDF templates, select "Additional Settings" from the configuration section of the settings page and navigate down to "PDF Settings".  You will see the following options:

OpenCRM custom PDF settings

Once you have selected the PDFs you wish to use the custom PDFs for, save the settings and they will be enabled on your system.  OpenCRM comes with one default custom template for each of the PDFs, so there will be no point where the system is unable to generate PDFs for the modules when making the switch.

Editing templates can be done by administrators from the settings page in OpenCRM.  The option for PDF templates is within the "Communication Templates" section as shown below:

CRM communication templates

 Clicking on the PDF Templates link will give you the following screen:

PDF templates list screen in OpenCRM

The bold green text as shown above is to separate the different template sections so the templates are easy to differentiate.  Clicking on one of those will expand it to show all of the templates for that particular section, as shown below. 

If selecting the template from this option, you will be taken to a screen which will show the outline of the template you are looking at, as well as the options to edit, duplicate or delete the template, or to cancel out of the template and return to the template list :

Create New Template

Creating a new template will give you the same screen as editing an existing template, but the name, description, columns, header and footer will be blank:

OpenCRM new PDF template options and expanded section


Duplicate Existing Template (recommended)

If you are looking to create a new template, we typically advise people to duplicate one of the default templates or a template they have already created. This just saves you have to re-enter information or restyle your template.

PDF templates in OpenCRM can be duplicated to make editing the layout of them easier.  Duplicating is done from the duplicate button on the template details screen. 

Once you are on the details screen and you click to duplicate the template, you will be presented with the following screen:

Duplicating a PDF template in OpenCRM

This will allow you to set the template name and description, and also select the module you are copying the template to.  You can copy a PDF template to any of the other template modules as this will put the PDF header, PDF footer, PDF columns and the template settings the same as on the template you are copying.  For templates where these options are not relevant, the fields which don't appear on the template will appear blank.

When you save the duplicate, you will be returned to the list of PDF templates on your system so you can edit the new template, or another one of your choosing.

There is no limit to the number of PDF templates which can belong to any one section.


A Note on Merge Variables

If you need to add a new merge variable to your PDF template, the easiest way to the find the correct one is to look for the Merge Fields dropdown menu just above the Template Name section.

1. From there, you can select the correct field from the menu.

2. This will output the variable into the field next to it

3. And now you can copy it and add it to your PDF template header or footer

Good to know: When creating Quote, Sales Order, Invoice PDFs you can use the merge variables $full_billing_address and $full_shipping_address to merge the relevant address into your PDF.



Edit Existing Template

To you edit an existing template, you will select a template from the screen above and click on the edit button

Once there, you will be presented with one of the following two screens, depending on the PDF you are editing - with a Product Grid or without a Product Grid.

Product Grid Present

For quotes, purchase orders, sales orders, invoices and despatch notes, you will be shown the following screen:

Edit screen for quotes, sales orders, invoices, purchase orders and despatch notes

The first, untitled block with a drop down is for getting the merge variable for the fields to display on the PDF.  Selecting an item from the drop down will put the merge variable for that particular field in the box next to it for you to copy and paste into the template.

The PDF Template Information lets you set the name and description of the template which will appear on the PDF template list screen.  The name of the template is also used if there are more than one template for a particular type, so you can choose which one the system produces.

Template settings allows you to set the format of number fields on the template.  This section is specifically for the quotes, sales orders, purchase orders, invoices and despatch notes as these deal with quantities and currencies.  The current options in that section are:

  • Decimal places
  • Decimal point character
  • Thousand separator character

Using these makes creating templates for international currencies easier, as some places use different characters to separate thousand decimals.

The PDF header block for quotes, sales orders, purchase orders, despatch notes and invoices will be what is displayed above the product grid on the documentation.  On helpdesk and project PDFs, this will form the entire PDF template - a screen for the edit view of helpdesk and project PDF templates is shown later.

The PDF columns section, available on the sales documents, allows the selection, and naming, of the columns which will appear from the sales entity.  This includes any custom columns which have been set up and configured on the system.  This section is drag and drop, so you can move the columns from one box to another, and even in which order they will appear on the document.  To move the boxes, click and hold the gray border of the box and drag it to where you wish it to appear in the product grid, or to the "Available Columns" section if you wish to remove it from the PDF.  When moving the box, the place it will go to is shown with the text "Place here?", as shown below.

Drag and drop to choose PDF columns

The boxes in the "Current Columns" section can have their labels edited, and the PDF will reflect the change we have made.

This will produce the following grid header when the PDF is produced from OpenCRM:

Customised PDF product grid header

When the PDF is produced, the "Description" field, if it appears, is given three (3) times the width of the other columns due to the amount of text that is usually contained with that column.

The PDF Footer section allows you to customise what appears after the product grid on the PDF.  This section is not available on helpdesk or project PDF templates.

No Product Grid

If you are editing a helpdesk or project PDF, then the screen you will see when you are editing will look like the following:

PDF edit screen for helpdesk and project PDF templates


Rate This Article
  • 1 star
  • 2 star
  • 3 star
  • 4 star
  • 5 star
Feedback and Comments
captcha code  

You may also be interested in: