根据内容长度从mysql生成动态列宽的pdf
我使用FPDF库从数据库生成pdf文件,并扩展pdf_MySQL_表类以自动将数据排列到表中。但是我有17列要显示。所以它彼此重叠。我怎样才能使它扩展以适应内容 这是我的密码:根据内容长度从mysql生成动态列宽的pdf,mysql,fpdf,Mysql,Fpdf,我使用FPDF库从数据库生成pdf文件,并扩展pdf_MySQL_表类以自动将数据排列到表中。但是我有17列要显示。所以它彼此重叠。我怎样才能使它扩展以适应内容 这是我的密码: <?php require('../fpdf/mysql_table.php'); require_once('../db/connect.php'); // Page header class PDF extends PDF_MySQL_Table { function Header() { // L
<?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();
?>
有什么帮助吗?您必须使用multicell签出此链接,而不是cell 也许对你有帮助