【发布时间】:2019-05-24 09:11:46
【问题描述】:
我遇到了同样的问题,但我尝试在每个主题中使用给定的解决方案解决它,但似乎我无法解决它。 说“找不到类 'setasign\Fpdi\FpdfTpl'”
我是使用此 FPDF 和 FPDI 的新手,请帮助我解决我的问题
<?php
require_once('fpdf.php');
require_once('fpdi/fpdi.php');
require_once('fpdi/autoload.php');
// initiate FPDI
$pdf = new FPDI();
// add a page
$pdf->AddPage();
// set the source file
$pdf->setSourceFile("IBA.pdf");
// import page 1
$tplIdx = $pdf->importPage(1);
// use the imported page and place it at point 10,10 with a width of 100 mm
$pdf->useTemplate($tplIdx, 10, 10, 100);
// now write some text above the imported page
$pdf->SetFont('Helvetica');
$pdf->SetTextColor(255, 0, 0);
$pdf->SetXY(30, 30);
$pdf->Write(0, 'This is just a simple text');
$pdf->Output();
我只是想在我导入的 pdf 文件上加水印
【问题讨论】: