Как избавиться от видимых артефактов Border Bottom при использовании библиотеки TCPDF - PullRequest
0 голосов
/ 10 октября 2019

i 'изменил example_011.php из библиотеки tcpdf и установил все границы снизу:

// Colored table
public function ColoredTable($header,$data) {
    // Colors, line width and bold font
    $this->SetFillColor(255, 0, 0);
    $this->SetTextColor(255);
    $this->SetDrawColor(128, 0, 0);
    $this->SetLineWidth(0.3);
    $this->SetFont('', 'B');
    // Header
    $w = array(40, 35, 40, 45);
    $num_headers = count($header);
    for($i = 0; $i < $num_headers; ++$i) {
        $this->Cell($w[$i], 7, $header[$i], "B", 0, 'C', 1);
    }
    $this->Ln();
    // Color and font restoration
    $this->SetFillColor(224, 235, 255);
    $this->SetTextColor(0);
    $this->SetFont('');
    // Data
    $fill = 0;
    foreach($data as $row) {
        $this->Cell($w[0], 6, $row[0], 'B', 0, 'B', $fill);
        $this->Cell($w[1], 6, $row[1], 'B', 0, 'B', $fill);
        $this->Cell($w[2], 6, number_format($row[2]), 'B', 0, 'R', $fill);
        $this->Cell($w[3], 6, number_format($row[3]), 'B', 0, 'R', $fill);
        $this->Ln();
        $fill=!$fill;
    }
    $this->Cell(array_sum($w), 0, '', 'T');
}

Проблема в том, что на границах отображаются небольшие артефакты на левой и правой границе:

showing artifacts

Это известная ошибка / как я могу от нее избавиться? Я думаю, что причина в том, что граница снизу перекрывается.

...