'Extra space after html in TCPDF's writeHTMLCell
I am not able to remove the extra space after my html when I write it out in TCPDF using writeHTMLCell.
The value of StringHeight is 24.7 for my example string. I use this as the height of the cell in writeHTMLCell. I also hard-coded ht=12 which seems far closer to what I would expect. You can see the results of both in the image below.
So what can I do to remove the extra space in the cell? Is it table cell margin/padding setting? (I thought TCPDF does not handle margin/padding settings)
Here's the relevant code snippet;
$tagvs = array('p' => array(0 => array('h' => 0, 'n' => 0), 1 => array('h' => 0, 'n' => 0)));
$pdf->setHtmlVSpace($tagvs);
$xhtml='<p style="text-align:center;"><b>Ration Cooperation</b><br/><i>Expectation:13%</i></span><br/><br/>Victory Anapolis Valvoline(6%)</p>';
$str_ht=$pdf->getStringHeight(43.5,$xhtml,true,false,'',true);
$pdf->writeHTMLCell($cat_wid, $str_ht, '', '',$xhtml, 1, 1, 1, true, 'L', false);
$pdf->writeHTMLCell($cat_wid, 12, '', '', $xhtml, 1, 1,1, true, 'L', false);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

