我成功地用函数测试了我的代码Zend_Pdf()
以便于理解,这是我的代码:
$pdf = new Zend_Pdf();
$page = new Zend_Pdf_Page(Zend_Pdf_Page::SIZE_A4);
$font = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA);
// set font for page
// write text to page
$test = "This is reporting for <br /> hello world: LALALA......";
$page->setFont($font, 15)
->drawText('That which we call a rose,', 72,720)
->drawText("$test", 72, 620);
// add page to document
$pdf->pages[] = $page;
$pdf->save("data/reports/" . $_SESSION['User_fonction'] ."-report.pdf");
我的鳕鱼将显示在 pdf 文件中
That which we call a rose
和 This is reporting for <br /> hello world: LALALA......
我的问题
我如何通过在其中编写标签 html 来解决这个问题,就像标签<br />
应该知道的那样?请任何曾经了解它的人。任何帮助...
我期待很快看到你的回复。谢谢 。