php - MPDF No Output (Blank Page) -
i'd installed mpdf utility in order convert html&css pdf reports. far things have been working fine, until i've tried converting page pdf ,and there's no output.
i have mention i'm able display page regularly through browser - problem comes when i'm trying convert pdf - receive blank page. moreover, there no encoding problems (part of output written in hebrew, i've overcame obstacle)
here's part of code :
if($customer!=$tempcustomer) { if($tempcustomer!="") { $html.=("</table>"); $html.=("</br>סהכ".$sumtotal."</br>"); $html.=("</br>משטחים".$sumpallets."</br>"); } $sumtotal=0; //reset sum of each customer $sumpallets=0; //reset pallets count $html.=("</div>"); $html.=("<div class='subtable'>"); // $html.=("לקוח: ".$customername."</br>"); $sumtotal=0; $sumpallets=0; $tempcustomer=$customer; $html.=("<table border='3' <tr><td>מגדל</td><td>תאריך</td><td>תעודה</td><td>פריט</td><td>סוג</td><td>גודל</td><td>כמות</td><td>משקל</td><td>מחיר מכירה</td><td>סכום</td><td>משטחים</td></tr>"); $html.=("<tr>"); $html.=("<td>".$grower."</td>"); $html.=("<td>".$date."</td>"); $html.=("<td>".$form."</td>"); $html.=("<td>".$item."</td>"); $html.=("<td>".$type."</td>"); $html.=("<td>".$size."</td>"); $html.=("<td>".$quantity."</td>"); $html.=("<td>".$weight."</td>"); $html.=("<td>".$price."</td>"); $html.=("<td>".$total."</td>"); $html.=("<td>".$pallet."</td>"); $html.=("</tr>"); $sumtotal+=$total; $sumpallets+=$pallet; } else { $html.=("<tr>"); $html.=("<td>".$grower."</td>"); $html.=("<td>".$date."</td>"); $html.=("<td>".$form."</td>"); $html.=("<td>".$item."</td>"); $html.=("<td>".$type."</td>"); $html.=("<td>".$size."</td>"); $html.=("<td>".$quantity."</td>"); $html.=("<td>".$weight."</td>"); $html.=("<td>".$price."</td>"); $html.=("<td>".$total."</td>"); $html.=("<td>".$pallet."</td>"); $html.=("</tr>"); $sumtotal+=$total; $sumpallets+=$pallet; } /* $html.=("<td>".$form."</td>"); $html.=("<td>".$form."</td>"); $html.=("<td>".$form."</td>"); $html.=("<td>".$form."</td>"); $html.=("<td>".$form."</td>"); $html.=("<td>".$form."</td>"); $html.=("<td>".$form."</td>"); $html.=("<td>".$form."</td>"); $html.=("<td>".$form."</td>"); $html.=("<td>".$form."</td>"); $html.=("</tr>"); */ } $html2='אבדרכדכגכגכגכג'; $html3='אבדרכדכגכגכגכג'; //============================================================== //mpdf settings - continue $mpdf->setautofont(); $mpdf->autofontgroupsize = 1; $mpdf->setdirectionality('rtl'); $mpdf->uselang = true; $mpdf->writehtml($html); $mpdf->output(); exit;
any suggestions?
thanks in advance
have tried debugging it? per mpdf's site: if nothing blank screen on browser, may because there script error. turn on debugging @ start of script.
<?php include("../mpdf.php"); $mpdf=new mpdf(); $mpdf->debug = true; $mpdf->writehtml("hallo world"); $mpdf->output(); ?>
if above works, it's code. sometime, single space before html output can throw off mpdf
Comments
Post a Comment