【发布时间】:2023-04-10 01:57:01
【问题描述】:
我有一个 PHP,它使用 FPDF 库从 DB 数据创建 PDF。
我使用标题来显示标题和徽标。徽标在所有页面中都显示正确,但文本不会出现在第一页,仅出现在其他页面上。
我使用这个功能:
function Header() {
$this->SetDrawColor(31,124,14);
$this->Line(10,15,17,15);
$this->Image('someLogo.png',20,10);
$this->Text(100,25,"TITTLE");
$this->Line(50,15,200,15);
$this->Line(200,15,200,20);
$this->Line(10,32,17,32);
$this->Line(50,32,200,32);
$this->Line(200,32,200,27);
$this->Ln(50);
}
线条画出类似框架的东西。
谢谢!
【问题讨论】:
-
你知道你可以用 $this->Cell(100,25,'Title',1,0,'C') 函数来放置标题..它会为你创建所有的行..