Menu

#1124 Table border width different width overlapp

v1.0_(example)
open
nobody
None
1
2016-06-12
2016-06-12
Jascha
No

When I create a HTML table with different border widths, the edges where different width borders come toghether are not printed right. The wider borders overlapp the thunner ones.

Here is an example code You can se the results and the errors in the attached screen shot

<?php
require_once('tcpdf_6.2.11/tcpdf.php');
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
$pdf->AddPage();

$tbl='<table border="1" cellmargin="0" cellpadding="10" style=" border-collapse: collapse;margin:0px;border:1px solid black;">';
for ($i=0;$i<15;$i++)
{
    $tbl.='<tr nobr="true">';
    if ($i==14)
    {
      $tbl.='<td style="border-left:5px solid black;border-bottom:5px solid black;">Text<br>Text<br>Text</td>';
      $tbl.='<td style="border-left:1px solid black;border-bottom:5px solid black;">Text<br>Text<br>Text</td>';
    }
    else
    {
        $tbl.='<td style="border-left:5px solid black;border-bottom:1px solid black;">Text<br>Text<br>Text</td>';
      $tbl.='<td>Text<br>Text<br>Text</td>';
    }
    $tbl.='</tr>';
}
$tbl.='</table>';

$pdf->writeHTML($tbl, true, false, false, false, '');
$pdf->Output('example_048.pdf', 'I');
1 Attachments

Discussion


Log in to post a comment.