MaheswariRamachandran / dompdf

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

CSS float create infinite recursion #480

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Using the html page in attachment, it will create an infinite recursion call on 
"Text_Frame_Reflower->_layout_line( )" or at least fill my call stack up to 450 
entry (apache crash if I put a higher limit).

What is the expected output? What do you see instead?
Output should be a simple image with a sentence next to it.
I get a stack overflow error: Fatal error: Maximum function nesting level of 
'450' reached, aborting!

The stack starts with regular calls, then there's a bunch of 
"Text_Frame_Reflower->_layout_line( )". And finally, some calls like 
"Line_Box->__construct( )", "Line_Box->get_float_offsets( )", etc.

What version of dompdf are you using? What version of PHP? On what
operating system?

DOMPDF 0.6.0 beta 3
PHP Version 5.3.10
Apache/2.2.21 (Win64) 
Windows 7 Enterprise Edition Service Pack 1

In fact, it's the lastest wamp bundle.

Please provide the HTML source code you want to convert, or any additional
information.

Page to render is in attachment.
The error ouput is also in attachment.

Custom settings of dompdf:
define("DOMPDF_ENABLE_PHP", true);
define("DOMPDF_ENABLE_REMOTE", true);
define("DOMPDF_ENABLE_CSS_FLOAT", true);

Custon settings of php.ini:
xdebug.max_nesting_level = 450

Original issue reported on code.google.com by Ph.Ha...@gmail.com on 11 May 2012 at 1:44

Attachments:

GoogleCodeExporter commented 9 years ago
There isn't an infinite recursion, but it may be more than your system can 
handle. Two questions: How much memory is available to dompdf? Can you let us 
know how much memory dompdf is using when your xDebug limit is lifted (and 
apache crashes)?

FYI, I am able to render this document on my own server:
http://eclecticgeek.com/dompdf/debug.php?identifier=e98d9cf235af92bf1285b1b6e70b
3f5d

Original comment by eclecticgeek on 13 May 2012 at 3:37

GoogleCodeExporter commented 9 years ago
I removed xdebugger for the recursion limit and I increased the memory limit de 
512M. It now renders, but the image is on the right and over the text.

Original comment by Ph.Ha...@gmail.com on 14 May 2012 at 1:34

GoogleCodeExporter commented 9 years ago
width: auto on the floating DIV is causing issues for dompdf. If you specify 
the width (try width: 200px;) the document will render as expected.

We're still working to fully support float. This feature has come a long way, 
but you can still consider it somewhat experimental (thus the configuration 
setting). Watch Issue 19 for updates to float support.

Original comment by eclecticgeek on 15 May 2012 at 2:00

GoogleCodeExporter commented 9 years ago

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