I want to know the height of specific HTML content so I can fix the position of an HTML table.
$htmlDatatable = "<table>
<thead>
<tr>
<td width='100'>Sr. No</td>
<td width='200'>Name</td>
<td width='100'>Addr</td>
</tr>
</thead>
<tbody>
<tr><td>1</td><td>Abc</td><td>Mumbai</td></tr>
<tr><td>2</td><td>Pqr</td><td>Mumbai</td></tr>
<tr><td>3</td><td>Lmn</td><td>Mumbai</td></tr>
<tr><td>4</td><td>Xyz</td><td>Mumbai</td></tr>
</tbody>
</table>";
$pdf->writeHTMLCell(0, 0, x,y, $htmlDatatable);
The getStringHeight()
function calculates the wrong height. I want to set table bottom to top. The point (x,y) should be placed at the bottom right. How can I do that?