Break in P tag based on length in PDF Template

<td  align="left" colspan="12" style="border-right: 0.5px solid #B3B3B3;border-bottom: 0.5px solid #B3B3B3;padding:6px;">
      <#if item.custpage_jj_lot?has_content || item.custpage_jj_coo?has_content ||  item.custpage_jj_datecode?has_content>
						<p style="line-height:12pt; padding-top: -1 px; padding-bottom: -1 px;">
                          <#if item.custpage_jj_lot?has_content>
								<b>LOT: </b>${item.custpage_jj_lot}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</#if>
                          <#if item.custpage_jj_lot?has_content && (item.custpage_jj_coo?has_content ||  item.custpage_jj_datecode?has_content) && item.custpage_jj_lot?length &gt; 30><br /></#if>
							<#if item.custpage_jj_coo?has_content>
								<b>COO: </b>${item.custpage_jj_coo}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</#if>
                          <#if item.custpage_jj_datecode?has_content && (item.custpage_jj_lot?has_content ||  item.custpage_jj_coo?has_content) && (item.custpage_jj_lot?length + item.custpage_jj_coo?length) &gt; 18 && item.custpage_jj_lot?length &lt;= 30><br /></#if>
							<#if item.custpage_jj_datecode?has_content>
								<b>Date Code: </b>${item.custpage_jj_datecode}</#if>
						</p>
					</#if>
    </td>

Leave a comment

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