Nested table height in TCPDF
Posted
by Kuroki Kaze
on Stack Overflow
See other posts from Stack Overflow
or by Kuroki Kaze
Published on 2010-04-14T10:51:58Z
Indexed on
2010/04/15
9:43 UTC
Read the original article
Hit count: 563
Is it possible to make nested table fit height of its parent cell in TCPDF?
My code:
<?php
require_once('tcpdf/config/lang/eng.php');
require_once('tcpdf/tcpdf.php');
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
$pdf->SetFont('times', 'BI', 8);
$pdf->AddPage();
$pdf->writeHTML('<table>
<tr><td bgcolor="gray"> Angoisse et vif espoir, sans humeur factieuse.<br/>
Plus allait se vidant le fatal sablier,<br/>
Plus ma torture était âpre et délicieuse;<br/>
Tout mon coeur s’arrachait au monde familier</td>
<td bgcolor="lightgray">Second</td>
<td bgcolor="gray">Third</td>
<td>
<table style="height: 100%">
<tr bgcolor="blue" style="height: 30%"><td bgcolor="yellow" style="height: 30%">Ichi</td></tr>
<tr bgcolor="white" style="height: 30%"><td bgcolor="cyan" style="height: 30%">Ni</td></tr>
<tr bgcolor="blue" style="height: 30%"><td bgcolor="yellow" style="height: 30%">San</td></tr>
</table>
</td></tr>
</table>');
$pdf->Output('example_002.pdf', 'I');
?>
I want table in last cell to fill it entirely. Is there any way to do this?
© Stack Overflow or respective owner