1
我使用html2pdf
(基於TCPDF
)在CakePhp中呈現Views
的PDF
。 但是,有時這代人掛起,我的意思是瀏覽器凍結,從不接收數據。Html轉換爲CakePhp中的PDF使用html2pdf掛起
有一種方法可以調試這種行爲嗎?在apache
日誌我沒有看到任何類型的錯誤...
$this->set(compact('quotation','company','user'));
$view = new View(null, false);
$view->set(compact('quotation','company','user'));
$view->viewPath = 'Quotations';
$view->layout = 'preventivo';
if ($quotation['Quotation']['quotation_type'] == SERVICE)
{
$content = $view->render('print_s_template');
$this->set(compact('content'));
$this->response->type('pdf');
$this->render('print');
的print.ctp
具有
App::import('Vendor', 'HTML2PDF', array('file' => 'html2pdf'.DS.'html2pdf.class.php'));
$html2pdf = new HTML2PDF('P','A4','it');
$html2pdf->WriteHTML($content);
$html2pdf->Output('exemple.pdf');
和html
是print_s_template.ctp
。
檢查應用程序日誌文件。猜猜這是用完了內存的php。 – burzum 2014-09-10 12:38:19