<style>p { margin: 0; }span.fr-emoticon.fr-emoticon-img { background-repeat: no-repeat !important; font-size: inherit; height: 1em; width: 1em; min-height: 20px; min-width: 20px; display: inline-block; margin: -0.1em 0.1em 0.1em; line-height: 1; vertical-align: middle; } span.fr-emoticon { font-weight: normal; font-family: "Apple Color Emoji", "Segoe UI Emoji", "NotoColorEmoji", "Segoe UI Symbol", "Android Emoji", "EmojiSymbols"; display: inline; line-height: 0; } blockquote { border-left: solid 2px #5e35b1; color: #5e35b1; margin-left:0; padding-left:5px;}blockquote blockquote{ border-color: #00bcd4; color: #00bcd4;}blockquote blockquote blockquote{ border-color: #43a047; color: #43a047;} table.grid{ border-collapse: collapse;} table.grid td, table.grid th { border: 1px solid #ddd;} .fr-fic.fr-dib{ display: block; margin: 5px auto;}.fr-fic.fr-dib.fr-fir{ text-align: right; margin: 5px 0 5px auto;}.fr-fic.fr-dib.fr-fil{ text-align: left; margin: 5px auto 5px 0;}.fr-fic.fr-dii{ float: none; margin: 5px auto;}.fr-fic.fr-dii.fr-fil{ float: left; margin: 5px auto;}.fr-fic.fr-dii.fr-fir{ float: right; margin: 5px auto;}img.fr-dib.fr-fir { margin-right: 0; text-align: right;}img.fr-dib.fr-fil { margin-left: 0; text-align: left;}img.fr-dib { margin: 5px auto; display: block; float: none;}img.fr-bordered { box-sizing: content-box; border: solid 5px #CCC;}img.fr-shadow { box-shadow: 10px 10px 5px 0px #cccccc;}img.fr-rounded { border-radius: 10px; -moz-border-radius: 10px; -webkit-border-radius: 10px; -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;}</style><p><strong>In this guide we will cover:</strong></p><p><strong>- What are PDF Templates in Halo?</strong></p><p><strong>- How to Customise your PDF templates</strong></p><p><strong>- Who can configure PDF Templates?</strong></p><p><strong>- XML Ticket Templates</strong></p><p><br></p><p><br></p><p><strong><span style="font-size: 14pt;">What are PDF Templates in Halo?</span></strong></p><p>PDF templates are used when printing or generating PDFs for various entities within Halo. This allows those entities to be exported in a document-friendly format for distribution to customers, agents, or anyone else outside of Halo. The entities that can be exported as a PDF are as follows:</p><p><br></p><ul><li>Tickets</li><li>Quotations</li><li>Sales Orders</li><li>Purchase Orders</li><li>Invoices</li><li>Agreements</li><li>Reports</li><li>Composite Reports</li><li>Consignments</li><li>Knowledge Base</li><li>Assets</li><li>Bulk Assets </li></ul><p>These entities will all use a standard PDF template by default, some of which (e.g. contracts) will need editing before they are suitable for use. Each of these entities can also use a custom PDF template. PDF templates can be edited and added via Configuration > Reporting > PDF Templates. You can select which entity's templates you're viewing in the top-left.</p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImUzZmNjOGY1LWJhMGYtNGRmYy04ZWE1LTBhMDQ0YzJiN2Q3MiJ9.BcdOcestk9ECxEhFggfMM0qBCDDPbKPgRYdgFu2XqIM" class="fr-fic fr-fil fr-dib" width="527" height="314"></p><p><strong><span style="font-size: 10pt;">Fig 1. Select entity for PDF template</span></strong></p><p><br></p><p><strong><span style="font-size: 14pt;">How to Customise your PDF templates</span></strong></p><p>In this guide we will cover general PDF template customisation that can apply to most of the template entities. However, the customisation options you have will depend on the entity you are customising the template for. In this guide we will use a purchase order template as an example. </p><p><br></p><p>When editing a template you will be taken to the 'Details' tab.</p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjE2OThhNmJkLTdhNDItNDA2ZS04NzA4LWYxZjE5MGQ3NjY0ZCJ9.XCMAANeZiTDwMXkmFIEJ-_APYxSK8HJjYZ8NnVb2ypY" class="fr-fic fr-fil fr-dib" width="1363" style="width: 1365px; height: 844.254px;" height="844"></p><p><strong><span style="font-size: 10pt;">Fig 2. Details tab against PDF template</span></strong></p><p><br></p><p>Here you have the options to name the template, prepend (or append) an additional PDF to the template and attach a report to the template. For information on how to attach a report/report data to a PDF see our dedicated <a href="https://usehalo.com/halopsa/guides/2256" target="_blank" rel="noopener noreferrer"><strong>guide</strong></a>.</p><p><br></p><p><strong><span style="font-size: 12pt;">Appearance</span></strong></p><p>Under the 'Appearance' tab you can control how the PDF looks. This allows you to configure the basics of how the PDF will look, most appearance customisation can be done using the HTML for the template. </p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImViZGQxNTA4LTFmZDItNDU5MC05ZWE3LThjNDViZGE4MWNhNyJ9.pfvHpuL0CDXVpRVczwbpgPgjTDel1t4DNnASxTu8mP8" class="fr-fic fr-fil fr-dib" width="1400" style="width: 1402px; height: 859.708px;" height="860"></p><p><strong>Fig 2. Appearance option for PDF template</strong></p><p><br></p><p>If you have enabled a footer and/or header for the template you can enter the text you would like to display and where in the footer you would like this. A variable for the page number is entered here by default. </p><p><br></p><p>If you enable the use of a HTML footer you will be able to use HTML to customise what appears in the footer and how this looks. Dollar variables can be included here to pull data stored in your Halo instance (such as your organisation details). If you are using a HTML footer you will need to set the height of this footer in pixels. </p><p><br></p><p>A Background image URL can be set for the template, this image will be imposed as the background of every page on the template. </p><p><br></p><p>The page height and width can be overridden here, but leaving these fields blank will result in an A4 size page being used. </p><p><br></p><p>The media type, the type chosen will will determine if the PDF is rendered in a way that is more accessible for printing or viewing the PDF on a screen. </p><p><br></p><p><strong><span style="font-size: 12pt;">Details Table</span></strong></p><p>Under the 'Details Table' tab you can set what fields will show in the details table on the template. The details table contains the specific line information, such as the name of the item, the description, price quantity etc. </p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY2YTRjZGZlLTk2MzUtNDA0Yi1hMDNiLWY5Yzg3ODc1NzI2OSJ9.eBODkzi2vUj7QMPIBUxlEhnsNMGHDkGu1TppRyJ3ht8" class="fr-fic fr-fil fr-dib" width="1396" style="width: 1398px; height: 693.822px;" height="694"></p><p><strong><span style="font-size: 10pt;">Fig 3. Details table setup </span></strong></p><p><br></p><p>Each button here represents a column that will appear in the table, these buttons can be dragged and dropped to re-order the columns in the table. Additionally buttons can be edited to change the name of the column and how data in this column is aligned. </p><p><br></p><p><strong><span style="font-size: 12pt;">Adding new columns to the details table </span></strong></p><p>Add a button here to see what fields are available to be added as a column. </p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImNmNTdkYjQ3LTdiNGMtNDVkOC04OWQxLWNmYzkyZWM4MGZlMyJ9.OsgD0sP4MZjEgq24ThZlUenpERzCZdIbtuctbmICpDI" class="fr-fic fr-fil fr-dib" width="564" height="380"></p><p><strong><span style="font-size: 10pt;">Fig 4. Adding a new column</span></strong></p><p><br></p><p>If the column you would like to add is not covered by one of the pre-set options here you can add a custom column by selecting 'Add a custom column' here. </p><p><br></p><p><strong>Adding custom Columns</strong></p><p>Custom columns are used to pull data from variables. When adding a custom column enter a $-variable into the cell content to pull the data associated with this variable. </p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjA1ZjJiY2I5LTA1NGUtNDhlYi04NWQwLTgwMWI0Y2UyZThkMSJ9.wrVjP6MwTpUVwgB8spQT-AKaekCsgmr3jPInLwL104o" class="fr-fic fr-fil fr-dib" width="565" height="458"></p><p><strong><span style="font-size: 10pt;">Fig 5. Custom column example </span></strong></p><p><br></p><p>In the figure 5 example I am creating a custom column that will contain the sales description for each line item. </p><p><br></p><p>To see a list of available variables use the 'View-$variables' button against the template and filter the variables by 'Product'. </p><p><br></p><p><strong><span style="font-size: 12pt;">Customising how the template looks using HTML </span></strong></p><p>Most template customisation is done by editing the HTML of the template. To edit the HTML head to the 'pages' tab. On the table on this page there will be a line for each page of the document, each 'page' may take up more than one page space in the document but they are organised into these sections. </p><p><br></p><p>Use the pencil icon against the line to edit the HTML for the page. </p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjdiMzllMGI1LTAzY2EtNGEzYy1iYmVkLTNlNTM5MmY2NDNjNSJ9.UTmSGLfGeG0uz6cVh9kwm5wNOh4z_QIrYrJ2AnBoE7Q" class="fr-fic fr-fil fr-dib" width="1368" style="width: 1370px; height: 597.298px;" height="597"></p><p><strong><span style="font-size: 10pt;">Fig 6. Access HTML for the template</span></strong></p><p><br></p><p>Here you will see the core HTML for the page.</p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImQzYWI4ZGZhLTgwOTAtNDEzMy1iOWNiLWI5NTcyNGE5MmM2ZiJ9.70TL2XEVJ4pilKT06Vr1oEgbgeXAifI1HIpj7VzGVQs" class="fr-fic fr-fil fr-dib" width="1720" style="width: 1722px; height: 848.386px;" height="848"></p><p><br></p><p><strong><span style="font-size: 10pt;">Fig 7. Core HTML for the page</span></strong></p><p><br></p><p>As well as sub HTML.</p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImNiYzViNTlhLTI2ZGItNGE3Zi04Mzc1LTk3MmQ5NTMzNzNlNiJ9.-ta1Mo3M2SNZaOzlDsVGH7sh4V_iGnc0fBceR-qP--o" class="fr-fic fr-fil fr-dib" width="1108" style="width: 1110px; height: 472.916px;" height="473"></p><p><strong><span style="font-size: 10pt;">Fig 8. Sub HTML</span></strong></p><p><br></p><p>Sub HTML is used here to add styling to rows in the details table. The variable $-DETAILSLINE refers to lines (rows) in the details table, in the figure 8 example styling has been applied to every other row in the details table so that every other row has the background colour #ccc. </p><p><br></p><p data-pasted="true">From v2.238+, Quote variables will populate when using Invoice PDFs when the invoice is raised from a Quote.</p><p><br></p><p>If you are customising your template and would like to preview how this looks you can use the 'Generate PDF' button against the template to generate a test PDF. The PDF generated will take data from your most recently created entity this template is for (i.e. the most recently created invoice, purchase order etc.). The 'Preview Print' button can be used to preview, however, a more accurate preview will be obtained by generating a PDF. </p><p><br></p><p><strong><span style="font-size: 12pt;">Previewing Template Changes</span></strong></p><p>When customising your templates you are able to preview how the template will look when in use, using existing data.</p><p><br></p><p>Changes can be previewed using the 'Preview Print' and 'Generate PDF' buttons within the PDF template. </p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImJkOWEzZGEyLWY5YzAtNDJkYS1hMjM3LTJlMjBjNDVmYjFjMCJ9.xEqVwEw9Wdl4Ou5OAVG8caMdzRlWbRSy1TaWQCVnQl0" class="fr-fic fr-fil fr-dib" width="873" style="width: 875px; height: 363.589px;" height="364"></p><p><strong><span style="font-size: 10pt;">Fig 9. Button to preview PDF template</span></strong></p><p><br></p><p><strong>Preview Print</strong> - This will allow you to preview the PDF template within the browser, useful for quick checks.</p><p><strong>Generate PDF</strong> - This will generate a PDF using this template, this can then be downloaded. Useful when significant changes have been made to the template. </p><p><br></p><p>You will be able to choose which data is used to generate this PDF. That is, if the PDF template is for tickets, you can select which ticket in your instance is used to generate the example PDF, the data from this ticket will be used to create a PDF using this template.</p><p><br></p><p><strong><em>Note: This will not store a record of the generated PDF in your Halo.</em></strong></p><p><br></p><p>From v2.238+, changes made to PDF template pages will show in config tracking, allowing changes to be pushed between connected instances.</p><p><br></p><p><strong><span style="font-size: 14pt;">Who can configure PDF Templates?</span></strong></p><p>Selected agents can be given permission to create and edit PDF templates. </p><p><br></p><p>To allow an agent to create new PDF templates, they must be given the permission 'Can Create PDF Templates', either at agent or role level. </p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImRkMjUwMjk1LTA5OWQtNDdjYS1iZmEyLWZmMTE4NjY0YTk1NiJ9.7TBrCYMA9azxf4ct60KxA5Fe-Hy-VBhjECm9eJIVDVY" class="fr-fic fr-fil fr-dib" width="493" style="width: 495px; height: 338.637px;" height="339"></p><p><strong><span style="font-size: 10pt;">Fig 10. Permission to create PDF templates</span></strong></p><p><br></p><p>This permission will allow the agent to create new PDF templates, but not edit existing templates, unless they were the one to create the template. </p><p><br></p><p>If you would like an agent to be able to view/edit an existing template you can give then access control to each template you would like them to be allowed to edit. To do this, navigate to a template, select the 'Access control' button. Here you can select an agent/role/team/department and what level of access they should have. </p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImIwMDkwMWRmLTE1MGItNDc3OC04MTlmLWQwMGEwODMzN2I1ZiJ9.xQ2NdLm0NvRZ9BtCRhKn8ot_MJgAZd4rZm_m1wMW45k" class="fr-fic fr-fil fr-dib" width="538" style="width: 540px; height: 299.091px;" height="299"></p><p><strong><span style="font-size: 10pt;">Fig 11. Access control on a PDF template</span></strong></p><p><br></p><p><strong><span style="font-size: 14pt;">XML Ticket Templates</span></strong></p><p>For templates using the "Tickets" entity, you can change the "File Type" from "PDF" to "XML".</p><p><br></p><p><strong><em>Note: Changing between the two will overwrite the PDF Pages/XML Attachments.</em></strong></p><p><br></p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Ijg5YzMzYjg5LTc2NjAtNDFhZC04OTk3LTIyOGMxYjNjYjRmNiJ9.roe5O89Z9pYBkQK7SnyKTCvF2TkIWU2jQHyvLhkPtpc" class="fr-fic fr-fil fr-dib" width="367" height="379"></p><p><strong><span style="font-size: 10pt;">Fig 12. File Type.</span></strong></p><p><br></p><p>Within the "XML Attachments" tab, you can then configure the template.</p><p><br></p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImU4NWNlZDkzLTIyOGQtNGJlZS1hNjA0LWU5OTE0NTNkYWVjNyJ9.83Xrza7Ij40Btz_gmw6WV51cHBkZhucgUcjmrerbE78" class="fr-fic fr-fil fr-dib" width="404" height="774"></p><p><strong><span style="font-size: 10pt;">Fig 13. XML Template.</span></strong></p><p><br></p><p>When previewing the template, the above example shows like the below with an expandable dropdown.</p><p><br></p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1MGU4MmVkLTE0ZTgtNDMxOC1iYWM2LWUzMTk2ZGU2ZDJhNSJ9.hHqg-_o2K60iGlBNjBWN-8-CvLd5dwM9BnnBXB9F4XM" class="fr-fic fr-fil fr-dib" width="1110" height="293"></p><p><strong><span style="font-size: 10pt;">Fig 14. XML Template example.</span></strong></p><p><br></p>