Scenario
Formatting rows on the item table based on the item type is currently a limitation in Advanced PDF/HTML Templates and is related to Enhancement : 376525.
Note: To search and vote for the enhancement, see 10054 Voting for Enhancements
You can leverage the HTML language in customizing the Advanced PDF/HTML in order to dynamically update the formatting of the row depending on the item type.
Solution
1. Navigate to Customization > Forms > Advanced PDF/HTML Templates
2. Preferred Template: Click Edit
3. Look for the line where the item list is printed as shown on the sample below
<table class="itemtable" style="width: 100%; margin-top: 10px;">
<#list record.item as item>
<#if item_index==0>
<thead>
<tr>
<th colspan="4">${item.item@label}</th>
</tr>
</thead>
<tr>
<td colspan="4"><span class="itemname">${item.description}td>
</tr>
</table>
Copy
4. Apply the sample code below where the item will be partially indented by adding spaces and the text will be bold:
<#if item.amount?string == '' >
<td colspan="4" style="padding-right: 5px;"><span class="itemname"><b>${item.description}</b></span></td>
<#else>
<td colspan="4"><span class="itemname">${item.description}</td>
Copy
5. Click Save