sivasekar / dompdf

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

row span over page break fails #80

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create an HTML table that wraps a PDF page, with a row span
2. here's a sample HTML file

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=iso-8859-15">
<style type="text/css">
body {
  font-size     : 10px;
  font-family   : Helvetica; 
}
table {
    border-collapse: collapse;
}
td {
    padding:0 0 15pt 5pt;
    border:1pt solid black;
    height:25em;
    }
.header {
    padding: 5px; 
    border: none;
    vertical-align: bottom;
    height:1em;
    font-weight:bold;
}
</style>
</head>
<body bgcolor="#FFFFFF">
  <table width="100%" cellspacing="0">
    <tr>
      <td class="header">col1</td>
      <td class="header">col2</td>
    </tr>
    <tr valign="top">
      <td class="list" rowspan="2">
      row1, col 1
    </td>
      <td class="list">row 1, col 2</td>
    </tr>
    <tr valign="top">
      <td class="list">
      row 2, col 2
      </td>
    </tr>
    <tr valign="top">
      <td class="list" rowspan="2">
      row 3, col 1
    </td>
      <td class="list">row 3, col 2</td>
    </tr>
    <tr valign="top">
      <td class="list">
      row 4, col 2
      </td>
    </tr>
  </table>
</body>
</html>

What is the expected output? What do you see instead?
if the page break happens before or after the row with the span, the output is 
fine. in the 
included HTML example, if he height of the td is 25em, it works. if it is set 
to 30em, it fails with a 
PHP fatal error (below).

What version of the product are you using? On what operating system?
PHP 5.2.9 on OSX 10.5.8, dompdf-0.5.1 and -0.5.2 both exhibit this behavior

Please provide any additional information below.

The apache error log shows this:
PHP Fatal error:  Uncaught exception 'DOMPDF_Internal_Exception' with message 
'Frame not 
found in cellmap' in 
/Library/WebServer/Documents/dompdf-0.5.2/include/cellmap.cls.php:224
Stack trace:
#0 
/Library/WebServer/Documents/dompdf-0.5.2/include/table_cell_renderer.cls.php(74
): 
Cellmap->get_spanned_cells(Object(Table_Cell_Frame_Decorator))
#1 /Library/WebServer/Documents/dompdf-0.5.2/include/renderer.cls.php(222): 
Table_Cell_Renderer->render(Object(Table_Cell_Frame_Decorator))
#2 /Library/WebServer/Documents/dompdf-0.5.2/include/renderer.cls.php(110): 
Renderer-
>_render_frame('table-cell', Object(Table_Cell_Frame_Decorator))
#3 /Library/WebServer/Documents/dompdf-0.5.2/include/renderer.cls.php(143): 
Renderer-
>render(Object(Table_Cell_Frame_Decorator))
#4 /Library/WebServer/Documents/dompdf-0.5.2/include/renderer.cls.php(143): 
Renderer-
>render(Object(Table_Row_Frame_Decorator))
#5 /Library/WebServer/Documents/dompdf-0.5.2/include/renderer.cls.php(143): 
Renderer-
>render(Object(Table_Frame_Decorator))
#6 /Library/WebServer/Documen in /Library/WebServer/Documents/dompdf-
0.5.2/include/cellmap.cls.php on line 224

Original issue reported on code.google.com by wah...@gmail.com on 20 Oct 2009 at 9:38

GoogleCodeExporter commented 9 years ago

Original comment by eclecticgeek on 20 Oct 2009 at 5:40

GoogleCodeExporter commented 9 years ago

Original comment by eclecticgeek on 20 Oct 2009 at 5:42

GoogleCodeExporter commented 9 years ago
An error occur as well, when a div tag is used. Really tricky when dompdf put 
the half of the div container at the end of site 1 and the other half on site 2.
Described here: 
http://oskarsmith.com/blog/view/dompdf_error_fixed_frame_not_found_in_cellmap

I don´t know why dompdf divided one container into two parts when the site 
ends.

Original comment by ukarr...@gmail.com on 1 Apr 2011 at 2:39

GoogleCodeExporter commented 9 years ago

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