sdglhm / dompdf

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

inline elements larger than the document page size cause an infinite loop #317

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set background-image:url('../img/briefCover.png');  in the css file.
2. Call dompdf function $dompdf->set_paper('letter', 'landscape');
3. Stream the code $dompdf->stream("testing.pdf");

What is the expected output? What do you see instead?
The file should appear in landscape orientation and the first page should have 
an image in the background. Instead, the browser gets stuck indefinitely trying 
to create the pdf. Nothing ever happens after that point.

What version of the product are you using? On what operating system?

dompdf 0.5.2 on Mac OSX 10.5.8

Please provide any additional information below.

The background image gets incorporated successfully and the pdf gets fully 
generated when I do not use the set_paper() function. However, when I do the 
aforementioned takes place. I have tried providing absolute URL for the image 
and that did not solve the issue. I also tried placing the image file elsewhere 
and that again did not help.

Original issue reported on code.google.com by capoeiri...@gmail.com on 5 Jul 2011 at 7:25

GoogleCodeExporter commented 9 years ago
Hello, can you try with the latest beta or even better with the version from 
the SVN trunk ?

Original comment by fabien.menager on 6 Jul 2011 at 11:02

GoogleCodeExporter commented 9 years ago
I just downloaded the version from the svn trunk.
I tried running the app again and now it fails completely, giving me the 
dreaded "Frame not found in cellmap" message. (Complete error message pasted at 
the bottom of this comment.)

I read up on it a bit and it seems to happen when divs span over more than one 
page, but with my code, that is not the case.

Any suggestions on what this may be, before I start going through my whole code?

Thank you.

M.
-------------

Fatal error: Uncaught exception 'DOMPDF_Internal_Exception' with message 'Frame 
not found in cellmap' in 
/home/vg-victory/web/virtuegroup.info/dompdf/include/cellmap.cls.php:227 Stack 
trace: #0 
/home/vg-victory/web/virtuegroup.info/dompdf/include/table_cell_renderer.cls.php
(83): Cellmap->get_spanned_cells(Object(Table_Cell_Frame_Decorator)) #1 
/home/vg-victory/web/virtuegroup.info/dompdf/include/renderer.cls.php(315): 
Table_Cell_Renderer->render(Object(Table_Cell_Frame_Decorator)) #2 
/home/vg-victory/web/virtuegroup.info/dompdf/include/renderer.cls.php(149): 
Renderer->_render_frame('table-cell', Object(Table_Cell_Frame_Decorator)) #3 
/home/vg-victory/web/virtuegroup.info/dompdf/include/renderer.cls.php(217): 
Renderer->render(Object(Table_Cell_Frame_Decorator), false) #4 
/home/vg-victory/web/virtuegroup.info/dompdf/include/renderer.cls.php(217): 
Renderer->render(Object(Table_Row_Frame_Decorator), false) #5 
/home/vg-victory/web/virtuegroup.info/dompdf/include/renderer.cls.php(217): 
Renderer->render(Object(Table_Row_Group_Fr in 
/home/vg-victory/web/virtuegroup.info/dompdf/include/cellmap.cls.php on line 227

Original comment by capoeiri...@gmail.com on 6 Jul 2011 at 2:34

GoogleCodeExporter commented 9 years ago
Ok, I fixed the frame not found issue and once that was out of the way, the new 
version seems to have helped with the background image issue.

Got another couple of problems now, but I'll work on them a bit and if need be, 
I'll open another ticket.

Thanks for your help.
M.

Original comment by capoeiri...@gmail.com on 6 Jul 2011 at 3:04

GoogleCodeExporter commented 9 years ago
The original problem would have been caused by an element that was too tall for 
your page size. The element causing the problem (possibly your background 
image?) was taller than a landscape page but not a portrait one, which is why 
you only encountered the error when you used $dompdf->set_paper('letter', 
'landscape')

It's still an issue we need to address, but I'm glad updating to the latest 
code helped.

We don't have an issue posted that covers this particular case. So I'm going to 
keep this one open (with a modified summary). I'm still a bit vague on the 
exact cause, though. Most likely cause: an inline element that's too big (e.g. 
an image)?

Original comment by eclecticgeek on 8 Jul 2011 at 3:15

GoogleCodeExporter commented 9 years ago

Original comment by eclecticgeek on 24 May 2013 at 3:00