dompdf problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: dompdf problem (/showthread.php?tid=9051) Pages:
1
2
|
dompdf problem - El Forum - 06-10-2008 [eluser]nandish[/eluser] Hi guys. while generating pdf document using dompdf library i had got below error message. Call to a member function get_id() on a non-object in /webroot/se/htdocs/system/plugins/dompdf/include/cellmap.cls.php on line 560 Thanks dompdf problem - El Forum - 06-10-2008 [eluser]hlz[/eluser] Your source html for the pdf is probably not correct. Could you post that? dompdf problem - El Forum - 06-10-2008 [eluser]nandish[/eluser] This is the view page <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <!--Created By Nandish @Unosoft Technologies--> <TITLE>PDFDOCUMENT</TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> <style type="text/css"> body { background-color:white; font-family:arial; color:black; } td{ padding-left:2px; padding-right:1px; } </style> </head> <body> <table border='1' cellspacing='0' cellpadding='0' width='100%' align='center'> <tr><td colspan='8' align='center'><h2>Game Schedule Details</h2></td></tr> <tr><td colspan='8' align="right"> <!--<font color="black">Year:</font> <?php echo $year;?> <font color="black">School Name:</font> <?php echo $schoolName;?>--> </td> </tr> <?php if (count($res)>0){ ?> <tr id="heading"> <td align ='center'>Home School Name</td> <td align = 'center'>Guest School Name </td> <td align = 'center'>Game Date</td> <td align = 'center'>Day</td> <td align = 'center'>Time</td> </tr> <?php foreach ($res as $items){ echo "<tr>"; echo "<td>".$items['s_hs_name']."</td>"; echo "<td>".$items['s_gs_name']."</td>"; $matchdate = $items['dt_match_date']; $date1 = date('m/d/Y', strtotime($matchdate)); $dateandtime = date('Y-M-d-D H:i', strtotime($matchdate)); $dateortime = split(" ", $dateandtime); $dateandday = split("-",$dateortime[0]); echo "<td>".$date1."</td>"; echo "<td>".$dateandday[3]."</td>"; echo "<td>".$dateortime[1]."</td>"; echo "</tr>";} } else{ echo "<div align='center'><h2>NO GAMESCHEDULE FOR THIS YEAR</h2></div>"; } ?> </table> </body> </html> dompdf problem - El Forum - 06-10-2008 [eluser]nandish[/eluser] This is the view page <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <!--Created By Nandish @Unosoft Technologies--> <TITLE>PDFDOCUMENT</TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> <style type="text/css"> body { background-color:white; font-family:arial; color:black; } td{ padding-left:2px; padding-right:1px; } </style> </head> <body> <table border=’1’ cellspacing=’0’ cellpadding=’0’ width=’100%’ align=’center’> <tr><td colspan=’8’ align=’center’><h2>Game Schedule Details</h2></td></tr> <tr><td colspan=’8’ align="right"> <!--<font color="black">Year:</font> <?php echo $year;?> <font color="black">School Name:</font> <?php echo $schoolName;?>--> </td> </tr> <?php if (count($res)>0){ ?> <tr id="heading"> <td align =’center’>Home School Name</td> <td align = ‘center’>Guest School Name </td> <td align = ‘center’>Game Date</td> <td align = ‘center’>Day</td> <td align = ‘center’>Time</td> </tr> <?php foreach ($res as $items){ echo "<tr>"; echo "<td>".$items['s_hs_name']."</td>"; echo "<td>".$items['s_gs_name']."</td>"; $matchdate = $items['dt_match_date']; $date1 = date('m/d/Y', strtotime($matchdate)); $dateandtime = date('Y-M-d-D H:i', strtotime($matchdate)); $dateortime = split(" ", $dateandtime); $dateandday = split("-",$dateortime[0]); echo "<td>".$date1."</td>"; echo "<td>".$dateandday[3]."</td>"; echo "<td>".$dateortime[1]."</td>"; echo "</tr>";} } else{ echo "<div align='center'><h2>NO GAMESCHEDULE FOR THIS YEAR</h2></div>"; } ?> </table> </body> </html> dompdf problem - El Forum - 06-10-2008 [eluser]hlz[/eluser] As far as i can see your colspan=’8' doesn't match with the number of <td>'s generated in the rows. This could be the problem. Another problem could be that your final html-table spans more than 1 page in your PDF. I've had problems with that in the past. dompdf problem - El Forum - 06-10-2008 [eluser]nandish[/eluser] i changed colspan ='8' to colspan='5' after that i execute the code,now i had got this message Fatal error: Maximum execution time of 30 seconds exceeded in /webroot/se/htdocs/system/plugins/dompdf/include/text_frame_reflower.cls.php(316) : runtime-created function on line 1 dompdf problem - El Forum - 06-11-2008 [eluser]hlz[/eluser] Your server is not able to create your PDF within the default 30 seconds a PHP-script can run. You could try to raise the 30 seconds like so: Code: ini_set('max_execution_time', '120'); dompdf problem - El Forum - 06-11-2008 [eluser]nandish[/eluser] I used set_time_limit(300); dompdf problem - El Forum - 09-19-2008 [eluser]pixelazion[/eluser] if i'm not mistaken this happens when a single table gets taller than the page. we have the same problem T_T Here's what i got every time i have a very tall table: Fatal error: Uncaught exception 'DOMPDF_Internal_Exception' with message 'Frame not found in cellmap' in /var/www/samplesite/system/plugins/dompdf/include/cellmap.cls.php:237 Stack trace: /var/www/samplesite/system/plugins/dompdf/include/table_cell_frame_reflower.cls.php(66): Cellmap->get_frame_position(Object(Table_Cell_Frame_Decorator)) /var/www/samplesite/system/plugins/dompdf/include/frame_decorator.cls.php(387): Table_Cell_Frame_Reflower->reflow() /var/www/samplesite/system/plugins/dompdf/include/table_row_frame_reflower.cls.php(70): Frame_Decorator->reflow() /var/www/samplesite/system/plugins/dompdf/include/frame_decorator.cls.php(387): Table_Row_Frame_Reflower->reflow() /var/www/samplesite/system/plugins/dompdf/include/table_frame_reflower.cls.php(468): Frame_Decorator->reflow() /var/www/samplesite/system/plugins/dompdf/include/frame_decorator.cls.php(387): Table_Frame_Reflower->reflow() /var/www/samplesite/system/plugins/dompdf/include/block_frame_reflower.cls.php(408): Frame_Decorator->reflow in /var/www/samplesite/system/plugins/dompdf/include/cellmap.cls.php on line 237 Help anyone T_T dompdf problem - El Forum - 09-19-2008 [eluser]Derek Allard[/eluser] I found and fixed that error (the tall table one) in Bamboo... but honestly, it was so long ago that I don't remember how. You may want to download it and compare the DOMPDF versions. Also, DOMPDF has a critical security vulnerability in it that (to my knowledge) is as yet unpatched. Be sure you follow their instructions for working around it. |