How to Wrap Descriptive Fields in the Advance PDF Template

The wrap will only function when the style has word wrap : break-word and the td have white-space : no wrap

Eg:

<table style=”border: 1px solid black; border-collapse: collapse; width: 100%; table-layout: fixed; word-wrap: break-word;”>

 <tr>

  <td style=”text-align: right; padding-right: 3px; white-space: nowrap;”>Address</td>

  <td style=”text-align: center; width: 10px;”>:</td>

  <td style=”text-align: left;”>${lineitem.shipaddress1}</td>

 </tr>

</table>

Or

<td class=”tdStyle” 

  align=”center” 

  valign=”middle” 

  style=”width: 15%; word-wrap: break-word; word-break: break-word; white-space: normal; line-height: 100%; text-align: center;”>

  ${lineitem.description}

</td>

Leave a comment

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