if ‘?has_content’ tag in markup language failed when printing advanced pdf template use ‘?string?has_content’
eg:
<#if record.custbody_total_plus_withholding?string?has_content> ${record.custbody_total_plus_withholding@label} ${record.custbody_total_plus_withholding}</#if>