I'm trying to create an HTML table in TCPDF, with few rows having grater space between rows (padding), and others having smaller padding.
$html = '<table border="0" cellpadding="6">
<tr>
<td style="width="52%">' . lang('ticket_name') . '</td>
<td style="width="18%">' . lang('ticket_price') . '</td>
<td style="width="12%">' . lang('quantity') . '</td>
<td style="width="18%">' . lang('total') . '</td>
</tr>
<tr>
<td style="padding: 10px">' . $item['name'] . '</td>
<td style="padding: 10px">' . $item['unit_price'] . '</td>
<td style="padding: 10px">' . $item['quantity'] . '</td>
<td style="padding: 10px">' . $item['row_total'] . '</td>
</tr>
<tr>
<td style="text-align:right" colspan="3">' . lang('price_basis') . ': </td>
<td>' . $totals['total_before_tax'] . '</td>
</tr>
<tr>
<td style="text-align:right" colspan="3">' . 'Ukupni popust' . ': </td>
<td>' . $totals['total_discount'] . '</td>
</tr>
<tr>
<td style="text-align:right" colspan="3">' . 'Sveukupno' . ': </td>
<td>' . $totals['grand_total'] . '</td>
</tr>
</table>';
$pdf->writeHTML($html, $linebreak = true, $fill = false, $reseth = true, $cell = false, $align = '');
As you can see, I have a cellpadding attribute in the table tag, which is working fine, but I want to have a different padding in the second row. Padding style obviously isn't working on 'td' nor on 'tr' tags.
I know it can be done with two separate tables with different cellpaddings, but it seems pretty wrong. There must be another way.