Zunenonooo / dompdf

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

Float with lots of Divs. #498

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Render more than 250 Divs with Float.
Use this PHP Code:

$html = "";
for ($i = 1; $i <= 260; $i++) {
    $html = $html.'<div class="objekt" style="position:relative; float:left; height:20px; width:200px;">Div Nr: '.$i.'</div>
    <div style="clear:both; display:inline-block; width:100%;"></div>';
}

echo $html;
$dompdf = new DOMPDF();
$dompdf->set_paper("a4", "landscape");
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream("sample.pdf");

What is the expected output? What do you see instead?
I Expect: All Divs should be under each other. Instead from div all Divs after 
div Nr. 248 are at the same place as Div 248.

What version of dompdf are you using? What version of PHP? On what
operating system?
Windows 7, PHP Version 5.3.8, DOMPDF 0.6.0 Beta 3

Please provide the HTML source code you want to convert, or any additional
information.
My HTML Code makes no sense. But if I add the clear div just every 3 Divs as 
example i could make a 3 colum layout.

But: The Floating divs have NOT to be in the same Document. If i would render 
100 pdfs with 3 Floating divs on every pdf, after 250 Divs the Bug will also 
appear.

Original issue reported on code.google.com by amerlan...@gmail.com on 7 Jun 2012 at 2:56

GoogleCodeExporter commented 8 years ago
Originally posted here: 
https://groups.google.com/d/topic/dompdf-dev/LryWbkQxQYg/discussion

Original comment by eclecticgeek on 8 Jun 2012 at 9:11

GoogleCodeExporter commented 8 years ago
This is essentially the same issue outlined in 495. As mentioned in the report, 
float support is still in development. We'll check to see what's causing this 
issue as we further develop float support.

Original comment by eclecticgeek on 9 Jun 2012 at 1:59

GoogleCodeExporter commented 8 years ago

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