我想使用PHP创建PDF,为此我使用FPDF。现在我想在PDF顶部添加两个图像(左上角和右侧一个)。我使用如下代码为此,使用FPDF在PDF中插入图像
代码: -
function Header() {
$this->Image('logo.png',10,20,33,0,'','http://www.fpdf.org/');
$this->SetFont('Arial', 'B', 20);
$this->SetFillColor(36, 96, 84);
$this->SetTextColor(28,134,238);
$this->Cell(0, 10, "Your Car Comparison Document", 0, 1, 'C', false);
$this->Cell(0, 5, "", 0, 1, 'C', false);
$this->Cell(0, 10, "Thanks for visiting CarConnect.", 0, 1, 'C', false);
$this->Cell(0, 5, "", 0, 1, 'C', false);
}
但是当我添加图像的代码,它会显示浏览器的其他404错误它工作正常。
在同一个文件夹中有一个图像(logo.png)我也把图像的完整url,但我面临同样的问题。 –