Make the first line of address bold in advanced pdf template

Scenario: How to make the first line of the address bold through xml?

Solution:

<span style=”font-size:10px;line-height:2″>Consignee (Ship to)</span><br /><br/>

<#assign shipaddress = record.shipaddress>

 

<#assign shipaddressLines = shipaddress?split(“<br />”)>

 

  <#assign x = 1>

 

  <#list shipaddressLines as line>

 <#if x == 1>

   

    <b> ${line}</b><br/>

    <#assign x = x+1/>

    <#else>

    <span> ${line}</span><br/>

    </#if>

  </#list>

Leave a comment

Your email address will not be published. Required fields are marked *