Hi
how do I work with HeaderCellsFillColor, with which code do I set the colour of the header cell or even of the following cells. Do I use class.TCPDF.EasyTable.php ?
Thanks and regards, Mario
1 Answers
You can connect on_render_pdf event handler and change config.
// params are array(<function-name>,<class-object> or <null-if-global-func>)
$e["on_render_pdf"] = array("set_pdf_format", null);
$g->set_events($e);
function set_pdf_format($arr)
{
$pdf = $arr["pdf"];
$data = $arr["data"];
// $pdf->SetFont('helvetica', '', 11);
$pdf->SetHeaderCellsFillColor(30,70,99);
$pdf->SetHeaderCellsFontColor(255,255,255);
}
Code: http://hastebin.com/icajinasil.php
To test, replace code with demos/export/export-pdf.php
Your Answer