示例#1
0
$pdf->Open();
$pdf->SetAutoPageBreak(true, 20);
$pdf->SetMargins(20, 20, 20);
$pdf->AddPage('L', 'a4');
$pdf->AliasNbPages();
$columns = 5;
//five columns
//$pdf->SetStyle("p","times","",10,"130,0,30");
//$pdf->SetStyle("t1","arial","",10,"0,151,200");
//$pdf->SetStyle("size","times","BI",13,"0,0,120");
$ttxt1 = "<size>Tag-Based MultiCell Table</size>\nCreated by <t1 href='mailto:andy@interpid.eu'>Bintintan Andrei, Interpid Team</t1>";
$ttxt2 = "<p>The cells in the table are fully functional <t1>Tag Based Multicells components</t1>. The description and usage of these components can be found <t1>here</t1>.</p>";
//Initialize the table class
$pdf->tbInitialize($columns, true, true);
//set the Table Type
$pdf->tbSetTableType($table_default_table_type);
//Table Header
for ($i = 0; $i < $columns; $i++) {
    $header_type[$i] = $table_default_header_type;
}
for ($i = 0; $i < $columns; $i++) {
    $header_type1[$i] = $table_default_header_type;
    $header_type2[$i] = $table_default_header_type;
    $header_type2[$i]['T_COLOR'] = array(10, 20, 100);
    $header_type2[$i]['BG_COLOR'] = $bg_color2;
}
$header_type1[0]['WIDTH'] = 20;
$header_type1[1]['WIDTH'] = 30;
$header_type1[2]['WIDTH'] = 40;
$header_type1[3]['WIDTH'] = 40;
$header_type1[4]['WIDTH'] = 20;