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:
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 TemplateCreating 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 TemplateTo 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 VariablesIf 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 PresentFor 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:
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 GridsSimilar 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:
Setting up and styling your PDF template
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.
PDFs with No GridIf you are editing a HelpDesk or Event PDF, then the screen you will see when you are editing will look like the following:
8. Add images to PDFs from a custom image field on your Quote, Sales Order, Invoice, etc.If you'd like to add an image to your PDF template from a field on your Quote, Sales Order, etc., you can do this very easily. But be aware that the image will be rendered in the size it has been uploaded so you should take care of sizing your image before uploading. Once you've added your custom image field, head over to your PDF template and add the merge variable for that field where you would like the image to go. The easiest way to get the merge variable is by using the field selector dropdown option on the PDF template editor.
Then when you export, you get something like this: Styling an Image Custom FieldIf you need to adjust the styling of an image from a custom field, to add a border or sizing for example, you will need to do this in the stylesheet of the template. This is usually found in the PDF Header. You will simply add "img" then ".cf_##" followed by the styling you want to add. So for example: 9. Exporting PDF Certificates From Events (for Attendees)This feature allows PDF documents to be created in bulk for all attendees on an event - for example to produce an event certificate. Details from both the event and individual attendees (Contacts) can be merged in to the PDF using standard merge variables. It is also possible to email all of the attendees their merged PDF in bulk, or email or download all of the generated PDFs to a single recipient. A new button has been added to the attendee sub tab on events: Select the attendees you wish to generate a PDF for by ticking the tickbox to the left of their name, then click the PDF Mail Merge button. When you click this, if you have multiple Event PDF templates, you will be asked to choose which template you wish to use, if you only have one event pdf template, the merge will start immediately. After selecting your event template, or if you only have one template, the following screen will display whilst the PDFs are generated: And then the results screen appears: From here, for each attendee record, you can individually download or email their PDF by clicking the link under the appropriate column. under the Email column, if this attendee has multiple email addresses, you'll be offered the choice of which address you want to send to - there will be a separate link for each email address - Business (Office email), Private and Company (the contacts primary linked Company email address) It is recommended to download at least one of the PDFs and check the output before bulk sending. At the bottom of the page are the bulk action buttons. Email All Attendees (Business/Private/Company) This option allows you to send the generated PDF to all attendees to the email address denoted by the button you choose. Each attendee will receive an individual email with their personalised PDF attached. When you click any of these buttons, the following screen is displayed which allows you to create the email to send, and also link any other attachments you want to send along with the personalised PDF: As you can see, this is very similar to a normal email screen. You can choose a template, change the subject, add additional attachments, even use the click through wizard to add click through links. By expanding the Email Information header, you can choose the time at which you want to send the emails generated. Once you click Schedule Send, an individual email is generated for each attendee. This will be automatically sent by the email scheduler at the time specified in the sending date and time field. If you are generating a large number of emails, be careful to check that you are happy with what will be sent before proceeding. Normal bulk mail restrictions will apply here - the system will stop you from sending to more recipients than your current mail quotas allow. Email All PDFs / Download All PDFS Download all PDFS will produce a single zipped file containing all the generate PDFs and prompt you to download this file. Email All PDFs will generate an email with all the individual PDFs linked so that you can send it to a single recipient (or multiple recipients) of your choice. By default a PDF has a border of padding around the content. It is possible to enable a PDF to fill the full page content (including using an image as a background to, for example, put a border around the whole page) as follows. Borderless PDFTo get the content of a PDF to fill the full page (no border padding) 1. Turn on the "Borderless" option under "Advanced settings" in the PDF template editor body 3. Enable and set the container div to be: 1456 x 1038 under "Advanced Settings" in the PDF template editor OR 3b. You could turn the container div off and add your own, e.g. the following HTML will put a 50px border around the content div style="border-style:solid;border-width:50px; height:1390px; width:965px" Borderless with image backgroundTo create a PDF with an image background that fills the whole page (e.g. to put a graphical border around the content) Before starting - your background image will need to be approx: 1040px x 1450px. 1. Upload the image using editor add/upload image feature You may also be interested in:
|