如何使用silverstripe TCPDF在PDF中添加背景图像


How to add backgroud image in PDF using silverstripe-TCPDF

我正在尝试向pdf中添加一个图像,该图像已生成,但无法正常工作。

 $this->Image('footer.jpg', 20, 720, 560, 100, 'JPG');

我试图将此添加到PDFgenerator.php文件中,但无法工作。image文件和PDFgenerator.php位于同一文件夹中。

  $this->SetFont('Times', '', 12, '', true); works fine.

这是"整页背景"的示例;)我认为情况是边距、页眉和页脚设置:

http://www.tcpdf.org/examples/example_051.phps