开发者

MDPF library generate blank page .. no error even i set debug mode

开发者 https://www.devze.com 2023-03-21 13:21 出处:网络
i am using mpdf library, it works perfect individuall in an folder on server, but if i include mpdf library in my application, then it output a blank page. if i see the HTML via firebug then display

i am using mpdf library, it works perfect individuall in an folder on server, but if i include mpdf library in my application, then it output a blank page. if i see the HTML via firebug then display

<html>
       <head></head>
       <body></body>
</html>

below is my page code

session_start();
error_reporting(-1);    
//include files and mpdf library

$id=(int)$_GET['id'];
//some mysql query and and

$html = "<div id=\"print_target_box\" style=\"display:block;\">";
// some php mysql manipulations
$html .="<b>..</b>
<strong>...</strong><br/>";
// many div and block concatenate by  $html.="";

$html .="</div>";  
$mpdf = new mPDF(); 
$mpdf->debug = true;
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;

echo phpinfo();

returns under zlib section

开发者_JS百科Directive   Local Value Master Value
zlib.output_compression Off Off
zlib.output_compression_level   -1  -1
zlib.output_handler no value    no value

and so on...

i also read this link

http://mpdf.bpm1.com/forum/comments.php?DiscussionID=121


one image `go.gif was missing on server and this does not displaying error bcoz error_reporting was set to 0 in below included php page..

If you edit file mpdf.php and find the line with that error message in it:

if (!$im) { return $this->_imageError($file, $firsttime, 
    'Error parsing image file - image type not recognised,
      and not supported by GD imagecreate'); }

change this to:

if (!$im) { echo $data; exit; }

it may show what is going wrong.

reference: http://mpdf.bpm1.com/forum/comments.php?DiscussionID=235


In my case the problem was missing mbregex. Line that generates the error is @command, which is just fabulous for debugging unknown stuff.

0

精彩评论

暂无评论...
验证码 换一张
取 消