我需要添加一个小文本,以便它位于我的PDF文件的页脚中。我正在尝试以下代码:
require_once('pdf/fpdf/fpdf.php');
require_once('pdf/fpdi/Fpdi.php');
$fullPathToFile = "../assets/files/".$arquivo;
$pdf = new FPDI();
$pdf->AddPage();
$pdf->setSourceFile($fullPathToFile);
$tplIdx = $this->pdf->importPage(1);
$this->pdf->useTemplate($tplIdx, 0, 0, 0, 0, true);
$this->pdf->SetFont('Arial', '', '13');
$this->pdf->SetTextColor(0,0,0);
$this->pdf->SetXY(20, 20);
$this->pdf->Write(0, 'my text');
$this->pdf->Output('gift_coupon_generated.pdf', 'D');
但这会返回以下错误:
严重错误:找不到类'setasign \ Fpdi \ FpdfTpl' /home/mysite/public_html/painel/pdf/fpdi/Fpdi.php,第25行