TCPDF grey background for few cells?

23,554

Solution 1

Easiest way is to deliver your content as HTML with some simple formating included.

Check example 6 from TCPDF examples

Solution 2

try this.

$this -> TCPDF -> SetFillColor(249,249,249); // Grey
$this -> TCPDF -> Cell(95,$cellHigh,$data,'L',0,'L',$fill,'',0,false,'T','C');

The TCPDF example No. 5 will give you different background colors.

Share:
23,554
pawelmysior
Author by

pawelmysior

Updated on June 29, 2020

Comments

  • pawelmysior
    pawelmysior almost 4 years

    I'm using TCPDF in CakePHP and trying to make some background (grey) for few cells. Well here the idea:

    alt text

    so the grey thing would somehow have to be define outside of the cells containg text.

    Any ideas?
    Paul