我有成功與功能Zend_Pdf()
爲便於理解,以測試我的代碼,這是我的代碼:Zend的PDF編寫HTML代碼來代替文本
$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 />
應該知道嗎? 任何人都可以用它來理解它。任何幫助...
我正在找字眼,看看你的答覆很快。謝謝 。
在文檔中沒有指出'Zend_Pdf_Page'支持html2pdf轉換 – DevZer0