using dompdf with drupal

3,328 views
Skip to first unread message

apfel007

unread,
Aug 7, 2009, 6:42:21 AM8/7/09
to dompdf
Hi, I'm using dompdf with drupal an the print module.

If I use vers. dompdf-0.5.1, I got an error like this. It seems that a
table is to big? Could that be? Can some one give me a hint, how to
solve the problem?

Fatal error: Uncaught exception 'DOMPDF_Exception' with message 'Box
property calculation requires containing block width' in /is/htdocs/
xxx/www/cms/xx/sites/all/modules/print/dompdf-0.5.1/include/
block_frame_reflower.cls.php:111 Stack trace: #0 /is/htdocs/xxx/www/
cms/xx/sites/all/modules/print/dompdf-0.5.1/include/
block_frame_reflower.cls.php(368): Block_Frame_Reflower-
>_calculate_restricted_width() #1 /is/htdocs/xxx/www/cms/xx/sites/all/
modules/print/dompdf-0.5.1/include/frame_decorator.cls.php(387):
Block_Frame_Reflower->reflow() #2 /is/htdocs/xxx/www/cms/xx/sites/all/
modules/print/dompdf-0.5.1/include/block_frame_reflower.cls.php(408):
Frame_Decorator->reflow() #3 /is/htdocs/xxx/www/cms/xx/sites/all/
modules/print/dompdf-0.5.1/include/frame_decorator.cls.php(387):
Block_Frame_Reflower->reflow() #4 /is/htdocs/xxx/www/cms/xx/sites/all/
modules/print/dompdf-0.5.1/include/block_frame_reflower.cls.php in /is/
htdocs/xxx/www/cms/xx/sites/all/modules/print/dompdf-0.5.1/include/
block_frame_reflower.cls.php on line 111


Fatal error: Uncaught exception 'DOMPDF_Internal_Exception' with
message 'Frame not found in cellmap' in /is/htdocs/xxx/www/cms/xx/
sites/all/modules/print/dompdf-0.5.1/include/cellmap.cls.php:237 Stack
trace: #0 /is/htdocs/xxx/www/cms/xx/sites/all/modules/print/
dompdf-0.5.1/include/table_cell_frame_reflower.cls.php(66): Cellmap-
>get_frame_position(Object(Table_Cell_Frame_Decorator)) #1 /is/htdocs/
xxx/www/cms/xx/sites/all/modules/print/dompdf-0.5.1/include/
frame_decorator.cls.php(387): Table_Cell_Frame_Reflower->reflow() #2 /
is/htdocs/xxx/www/cms/xx/sites/all/modules/print/dompdf-0.5.1/include/
table_row_frame_reflower.cls.php(70): Frame_Decorator->reflow() #3 /is/
htdocs/xxx/www/cms/xx/sites/all/modules/print/dompdf-0.5.1/include/
frame_decorator.cls.php(387): Table_Row_Frame_Reflower->reflow() #4 /
is/htdocs/xxx/www/cms/xx/sites/all/modules/print/dompdf-0.5.1/include/
table_frame_reflower.cls.php(468): in /is/htdocs/xxx/www/cms/xx/sites/
all/modules/print/dompdf-0.5.1/include/cellmap.cls.php on line 237


With this chunk of site code,Ii get an error:

<div class="content">
<p>A comment</p>
<div class="itu-attachment-images"><div class="item-list"><ul
class="attachment-thumbs"><li class="first last"><div class="itu-
attachment-thumb"><a href="https://xx.xx.de/system/files/groups/uid1-
Admin-nid273-070809.jpg"><img src="https://xx.xx.de/system/files/
imagecache/blogs/groups/uid1-Admin-Rav-nid273-070809.jpg"
alt="300709.jpg" title="300709.jpg" class="imagecache imagecache-
blogs" width="800" height="533" /></a></div></li>
</ul></div></div> </div>

<div class="links">
<ul class="links"><li class="comment_reply first last"><a href="/
comment/reply/273/47">Antwort</a></li>
</ul> </div>

</div></div> <!-- /comment-inner, /comment -->
</div>
</div>

</div></div> <!-- /#content-inner, /#content -->

BrianS

unread,
Aug 7, 2009, 12:21:11 PM8/7/09
to dompdf
This does look like it originates from a table.

> With this chunk of site code,Ii get an error:
>
>   <div class="content">
>     <p>A comment</p>
> <div class="itu-attachment-images"><div class="item-list"><ul
> class="attachment-thumbs"><li class="first last"><div class="itu-
> attachment-thumb"><a href="https://xx.xx.de/system/files/groups/uid1-
> Admin-nid273-070809.jpg"><img src="https://xx.xx.de/system/files/
> imagecache/blogs/groups/uid1-Admin-Rav-nid273-070809.jpg"
> alt="300709.jpg" title="300709.jpg"  class="imagecache imagecache-
> blogs" width="800" height="533" /></a></div></li>
> </ul></div></div>      </div>
>
>       <div class="links">
>       <ul class="links"><li class="comment_reply first last"><a href="/
> comment/reply/273/47">Antwort</a></li>
> </ul>    </div>
>
> </div></div> <!-- /comment-inner, /comment -->
>   </div>
>         </div>
>
>                </div></div> <!-- /#content-inner, /#content -->

Is this HTML contained within the table? I was able to reproduce your
error by placing the above HTML in a table without a specified width.
You can work around the problem by giving the table a width.

FYI, this issue has been addressed in the upcoming release.
-b

apfel007

unread,
Aug 12, 2009, 8:42:37 AM8/12/09
to dompdf
Thanks for that information.

Cheers
Reply all
Reply to author
Forward
0 new messages