<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>How to include QR codes within PDF Templates + a specific use case: The Swiss QR Bill</p>
<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>When generating PDF templates, you can include some specific HTML in order to render a QR code, returning data of your choice.</p><p><br></p><p>The PDF Template Online Repository has an example of how this is implemented. From your PDF Templates (Configuration>Reporting>PDF Templates), you will find an option to head to our PDF Template Online Repository:</p><p><br></p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImZiN2JmYjEwLTJmMWMtNDZkYi1hYTgyLWE2M2Y4NjA3NDk1MSJ9.rD39AbkXOu0epcjURs51c-kpYFVOp8Gs0Tzl812cN6c" class="fr-fic fr-fil fr-dib" style="width: 202px;" width="202" height="81"></p><p><br></p><p>In here, you will find an invoice template: QR Code:</p><p><br></p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImJmYzI1MDk3LWViYTgtNDgyMy1iODIyLTkyNmJiM2YxNDcwNyJ9.pPJX9JJUc1fI1ZKco2yiNeJFnFDLNVgzp7uV2jXHBcc" class="fr-fic fr-fil fr-dib" width="303" style="width: 303px; height: 234.792px;" height="234.792"></p><p><br></p><p>You can download the PDF Templates to your local reposiotry via clicking into the template, then selecting the below:</p><p><br></p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjI5MDk5ZjE3LTU2MTktNGM1My05MDhjLWJjYmNkZGQ0NGJkMiJ9.6ana1wpd6B5XF-hWBJ-1XXXSQfUeAxpM9gO27-ufius" class="fr-fic fr-fil fr-dib" width="483" style="width: 483px; height: 149.757px;" height="149.757"></p><p><br></p><p>This template includes a separate page with a QR bill slip:</p><p><br></p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjRjOTU2OTY5LTM0NDgtNDNlYS04NjY2LWFiNjczNzMzMjhjNCJ9.HfVzV-8j31Nu0EgDDXTDR7aAjIug_8uHCaa59WHn7DY" class="fr-fic fr-fil fr-dib" width="554" style="width: 554px; height: 371.237px;" height="371.237"></p><p><br></p><p>As far as HTML is concerned, there are a few key places to pay attention to.</p><p><br></p><p>Firstly, ensure you have the "<script>" tag present in the header of your HTML:</p><p><br></p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjNmYmQzYzlhLTI0OWEtNDEyMS1hODg4LWQ5NTQ1ODgwMGU3MSJ9.wdrKW2eGr_Mz_-yGyQKATedut52gL-fwADBZHPIr61E" class="fr-fic fr-fil fr-dib" width="511" style="width: 511px; height: 134.699px;" height="134.699"></p><p><br></p><p>The QR Code itself is returned via the below HTML/JavaScript:</p><p><br></p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImUzNjQxMzBiLTUyYzAtNGMxOC1hMDVlLWE3YzE3NmIwZDA1OSJ9.j4roXwTTRuKAJG3wwvQmb1sjE1JMPQzJX8rfyvUo8Tw" class="fr-fic fr-fil fr-dib" width="1477" style="width: 1477px; height: 635.699px;" height="635.699"></p><p><br></p><p>The 'Data' section of the above returns the text when scanning the QR code:</p><p><br></p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjIwMjc0YTNjLTViYTctNDU2Yi1hZTJjLTg5NDk2YjA1NmExNiJ9.J0ERGfU5JHKPs_O61eWicbUBeEx3c-tJ_nuNgR6k0z4" class="fr-fic fr-fil fr-dib" width="1084" style="width: 1084px; height: 49.3796px;" height="49.3796"></p><p><br></p><p>As you can see from this example, you can input $_variables into the data section of the QR code.</p><p><br></p><p><strong><span style="font-size: 18pt;">The Swiss QR Bill</span></strong></p><p><br></p><p><span style="font-size: 11pt; background-color: transparent;">The particular formatting of the QR code found in</span><span style="background-color: transparent; font-size: 11pt;"> the Online Repository is compliant Swiss QR Bill requirements, with one key considerations: currently, t</span><span style="background-color: transparent; font-size: 11pt;">he IBAN used must comply with the 'NON' reference type, denoting that there will not be a QR Reference or Creditor Reference included in the QR code. There is an option to provide additional details, but the formatting of these details will not necessarily follow the formatting required by the QR or Creditor Reference. Algorithms for calculating check digits for both QR and Creditor Reference's are currently being investigated & will be included in a future release of the template.</span></p><p><br></p><p>The Swiss QR bill requires some specific formatting of the data scanned, which can be addressed via the below points:</p><ul><li>Your Company IBAN should be returned in the QR - this is handed via the $_orBankDetails1 variable. This variable will populate the contents of the below field (Config>Organisation):<img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjdjZTNiYTljLTUxMzItNDM5Yi05ZTE5LTFhMjNhZTI5ZmNiOSJ9.fFJBh0cpmYs83ge43PgO8-8h0bj2jMXG--o_-DLRnuo" class="fr-fic fr-fil fr-dib" width="289" style="width: 289px; height: 383.441px;" height="383.441">Please ensure your IBAN is entered into this field.</li><li>OrganisationAddressLine1, OrAddressLine2, OrAddressLine3 & OrganisationAddressLine4 should be replaced with your Company address, formatted as per the <a href="https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-en.pdf" target="_blank" rel="noopener noreferrer"><strong>Swiss QR Bill Implementation guidelines</strong></a> (if only 3 address lines are needed, simply remove OrganisationAddressLine4)</li></ul><p><br></p>