我有来自MySQL DB的动态加载,我的页面URL是http:// localhost/far/contractview?ID = 137.当我尝试将此页面转换为PDF时,我遇到了一些错误,我不知道如何处理,只需按一下按钮即可将此页面转换为PDF.
我在下面提供了我的代码.我在用mpdf
.
debug = true; //$mpdf->allow_output_buffering = true; //$mpdf->SetHeader('|Your Header here|'); //$mpdf->setFooter('{PAGENO}');// Giving page number to your footer. $mpdf->useOnlyCoreFonts = true; // false is default $mpdf->SetDisplayMode('fullpage'); // Buffer the following html with PHP so we can store it to a variable later ob_start(); ?> WriteHTML($html); //$mpdf->SetProtection(array(), 'user', 'password'); uncomment to protect your pdf page with password. $mpdf->Output(); exit; ?>
提前致谢.