1

我正在使用 FPDF 库从数据库生成 pdf 文件,并正在扩展 PDF_MySQL_Table 类以自动将数据排列到表中。但我有 17 列要显示..所以它相互重叠..我怎样才能让它扩展以适应内容???

这是我的代码:

<?php
require('../fpdf/mysql_table.php');
require_once('../db/connect.php');


// Page header



class PDF extends PDF_MySQL_Table

{
function Header()
{
// Logo
 $this->Image('../fpdf/ccm_inner_logo.png',10,8,33); 
// Arial bold 15
$this->SetFont('Arial','B',15);
// Move to the right
$this->Cell(30);
// Title
$this->Cell(120,15,'Member Information',1,0,'C');
// Line break
$this->Ln(20);
}   



}


$pdf=new PDF();
$pdf->AddPage();
//First table: put all columns automatically
$pdf->Table("select * from  members");
$pdf->AddPage();

$pdf->Output();
?>

有什么帮助吗???

4

1 回答 1

0

而不是单元格,您必须使用多单元格结帐此链接 http://www.fpdf.org/en/script/script3.php可能会对您有所帮助

于 2014-01-21T12:14:53.237 回答