vikrambalye / dompdf

Automatically exported from code.google.com/p/dompdf
0 stars 0 forks source link

Table rowspan through pagebreak Crashes #342

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create table that has a rowspan through the page-break.
<table>
<tr><td rowspan="2">0</td><td>1</td></tr>
<tr><td>3</td></tr>
</table>

What is the expected output? What do you see instead?
Expect to imitate the split on the way down. Instead it crashes.

What version of the product are you using? On what operating system?
0-6-0_beta2

Please provide any additional information below.
[TEMP FIX]
You can see what it gives by rendering after commenting out lines 226, 227, 228 
on file include/cellmap.cls.php

[CRASH INFO]
Fatal error: Uncaught exception 'DOMPDF_Internal_Exception' with message 'Frame 
not found in cellmap' in 
/home/^^^/public_html/***/dompdf/include/cellmap.cls.php:227 Stack trace: #0 
/home/^^^/public_html/***/dompdf/include/table_cell_renderer.cls.php(80): 
Cellmap->get_spanned_cells(Object(Table_Cell_Frame_Decorator)) #1 
/home/^^^/public_html/***/dompdf/include/renderer.cls.php(290): 
Table_Cell_Renderer->render(Object(Table_Cell_Frame_Decorator)) #2 
/home/^^^/public_html/***/dompdf/include/renderer.cls.php(138): 
Renderer->_render_frame('table-cell', Object(Table_Cell_Frame_Decorator)) #3 
/home/^^^/public_html/***/dompdf/include/renderer.cls.php(196): 
Renderer->render(Object(Table_Cell_Frame_Decorator)) #4 
/home/^^^/public_html/***/dompdf/include/renderer.cls.php(196): 
Renderer->render(Object(Table_Row_Frame_Decorator)) #5 
/home/^^^/public_html/***/dompdf/include/renderer.cls.php(196): 
Renderer->render(Object(Table_Frame_Decorator)) #6 /home/^^^/publ in 
/home/^^^/public_html/***/dompdf/include/cellmap.cls.php on line 227

Original issue reported on code.google.com by brandonb...@gmail.com on 19 Aug 2011 at 9:04

GoogleCodeExporter commented 9 years ago
[Updated Workaround]
To make it so it won't crash, just add to the table tag like this: <table 
style="page-break-inside: avoid;">

Then it won't page break through the table that is using a rowspan.

Original comment by brandonb...@gmail.com on 19 Aug 2011 at 9:42

GoogleCodeExporter commented 9 years ago
This fix may cause problems for very large tables (ones that do not fit on a 
single page), but otherwise this should work fine as a temporary solution.

Original comment by eclecticgeek on 22 Aug 2011 at 5:02

GoogleCodeExporter commented 9 years ago

Original comment by eclecticgeek on 30 May 2013 at 5:16