DOMPDF: Frame not found in cellmap. What causes this error?

3

This problem has haunted me for a long time and I still can not find a solution for it.

I have developed a system, where in a given location, the user can print a report, which is generated by class DOMPDF , in Laravel 4 .

It seems that when the data theoretically would exceed the size of the PDF (a very large% eg, or whatever), an exception is thrown.

Exception Details:

Class: <td>

File: Cellmap

Line: vendor/dompdf/dompdf/include/cellmap.cls.php

Excerpt of the code where the exception is thrown:

function get_spanned_cells(Frame $frame) {
    $key = $frame->get_id();

    if ( !isset($this->_frames[$key]) ) {
      throw new DOMPDF_Exception("Frame not found in cellmap");
    }
}

In the% wrapper that is loaded by 224 , there are the data that I want to display in the PDF, listed in an HTML table.

NOTE : The exception data is not the file I'm working on but the DOMPDF library source code.

    
asked by anonymous 12.02.2015 / 19:55

1 answer

2

I have faced this problem, I have not used DOMPDF for a long time, but in my case the problem was an incompatibility with border-collapse of the table. It looks like this ticket is that the problem still persists link since 2013.

I also had problem with elements with very large content as you described, what I did to get around in these cases was to force a page break.

To force a break you must use one of the values recognized by DOMPDF , I tried to find some documentation but unfortunately a complete reference of all existing markers has not yet been developed. I know the following: page-break-inside , page-break-auto , page-break-after but I believe there are more types. An example of how to use it would look like this:

<table>
  <tr style="page-break-after:always;"></tr>
  <tr></tr>
  <!-- ... -->
</table>

I hope I have helped.

    
23.02.2015 / 14:27