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.
This article is going to cover:
- Where to go to edit PDF Templates
- How to create/duplicate a template
- Editing an existing template
- Using merge variables
- Setting up the Product Grid (for sales PDFs)
- Using the Linked Records Grid (for Company or Project Statements)
- Configuring a PDF with no Grid
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:
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:
Clicking on the PDF Templates link will give you the following screen:
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:
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:
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.
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.
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.
Product Grid Present
For quotes, purchase orders, sales orders, invoices and despatch notes, you will be shown the following screen:
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.
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:
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 PDF templates without a Product or Linked Record grid.
Linked Record Grids
Similar to the Sales modules, it is possible to included grids of certain linked records for the Companies and Projects PDF templates.
Companies can have a grid of linked Invoices and Projects a grid of linked Activities. Both grids work basically the same.
If you do not want to use the linked records grid on a PDF, you can simply move on to the next section of this article.
To enable the grid on a PDF template:
- In the "Template Settings" on the PDF edit screen, look for the "Show Linked Detail" field
- Select the Activities or Invoice option
- This will trigger the appearance of several new blocks on the Template Editor
Setting up and styling your PDF template
- Styling and configuring the Headers/Footers - works the exact same as the sales PDFs, so we won't cover it again here.
- Current/Available Columns - exact same as setting up your Product Grid
- Filtering the Linked records - this is where these PDF Templates are different.
With these Linked Record Grids, you can decide which records appear on the PDF through the use of the Standard and Advanced Filters:
As you can see, these work the same as those on Reports and Custom Views.
- Standard: filter against a date field
- In the example above, only Activities linked to a Project that have a created date before "today" will be included
- Advanced: filter against other fields
- The example will only show completed Activities, but you could choose to show only those that have a Charge Time of "Chargeable" or where the Type doesn't equal "Call"
PDFs with No Grid
If you are editing a HelpDesk or Event PDF, then the screen you will see when you are editing will look like the following: