<?php require_once('Util_ChineseFpdf.class.php'); class Util_Fpdf_CustomPdf extends Util_Fpdf_Chinese { function Header() //设置页眉 { $heads = iconv("utf-8", "gbk", '聊天记录'); $this->SetFont('GB','',10); $this->Write(15, $heads); $this->Ln(20); //换行 } function Footer() //设置页脚 { $pages = iconv("utf-8", "gbk", '第'.$this->PageNo().'页'); $this->SetY(-15); $this->SetFont('GB','',10); $this->Cell(0,10,$pages); } }