Reputation: 137
I can't seem to get my Advanced PDF to respect the <br>
tags on a long text field (address) so it prints on multiple lines for an envelope window. I've tried the following work-arounds:
NetSuite Long Text Field Console Elements [F12] Result:
TIM TESTER
<br>
123 MAIN STREET
<br>
CHICAGO, IL 63022
Attempts:
#1
<table border="0" cellpadding="1" cellspacing="1" style="width:100%;">
<#list result.custentity_long_text_address?split("<br />") as z>
<tr>
<td>${z}<br /></td>
</tr></#list></table>
#2
<table border="0" cellpadding="1" cellspacing="1" style="width:100%;">
<#list result.custentity_long_text_address?split("<br>") as z>
<tr>
<td>${z}<br /></td>
</tr></#list></table>
#3 (without table)
${result.custentity_long_text_address?replace("<br>", "<br />")}
Upvotes: 1
Views: 501
Reputation: 31
Are you sure the split is splitting the address accordingly? Using the tr + br tags you should definitely see a line break there (unless the address didn't split). Can you try with a hardcoded array?
<#assign address= ['TIM TESTER', '123 MAIN STREET', 'CHICAGO, IL 63022']>
Upvotes: 0
Reputation: 1341
Try using block elements: <div>, <p>
and then use CSS to stack them or inline them as you need
Upvotes: 0