如何在PHP中的fpdf中将图像添加到页脚

时间:2014-01-30 00:29:07

标签: image fpdf

我尝试在html2fpdf类的页脚中添加图片。

function Footer() {
        //This is the footer; it's repeated on each page.
        //enter filename: phpjabber logo, x position: (page width/2)-half the picture size,
        //y position: rough estimate, width, height, filetype, link: click it!
        $this->Image("uploads/footer.jpg", (8.5/2)-1.5, 9.8, 3, 1, "JPG", "http://www.abc.com");
    }

请帮忙,如何在fpdf

中添加页脚中的图片

先谢谢

1 个答案:

答案 0 :(得分:3)

在函数Image

中使用$ this-> GetY()作为设置高度
$pdf->Image($image1, 5, $pdf->GetY(), 33.78);

甚至

$pdf->Image($image1, 5, null, 33.78);