Open GoogleCodeExporter opened 8 years ago
It seems to be due to the get_margin_height() function called into
check_page_break
Actually, the check_page_break function use the get_margin_height() function
wich returns margins + div height, to calculate if there is enough place to
print a Frame. But it should only use the margins (and not the div height) of
the containers to calculate it.
So the fix i found is :
Create the following function into frame.cls.php:
function get_break_margins(){
return $this->_style->length_in_pt(array(/*$this->_style->height, -- NOT USED INTO Break checking*/
$this->_style->margin_top,
$this->_style->margin_bottom,
$this->_style->border_top_width,
$this->_style->border_bottom_width,
$this->_style->padding_top,
$this->_style->padding_bottom),
$this->_containing_block["w"]);
}
Then into frame_decorator :
function get_break_margins() { return $this->_frame->get_break_margins();}
Finally :
into the file page_frame_decorator.cls.php
near the line 445
replace
$max_y = $frame->get_position("y") + $frame->get_margin_height();
by
$max_y = $frame->get_position("y") + $frame->get_break_margins();
I'm not really sure of what consequences it may have on the PDF generating, so
if someone from the DOMPDF Team could validate i'm not wrong...
But for the moment it seems to work pretty good for the exemple file.
(I'm sorry if my english is a little poor, i'm a french guy)
Original comment by sylvain....@gmail.com
on 22 Sep 2010 at 1:14
Hello, sorry for the late reply, I tried the HTML and CSS you provided,and I
have the same problem with the trunk, but, I don't know why this happens.
It seems that the height: 100% on #contributions is a part of the problem, but
I don't know why.
It clearly is an annoying bug, I'm going to fix it.
By the way, I'm French too, so if you are still working on this project, I may
help you easily ;)
Original comment by fabien.menager
on 1 Feb 2011 at 9:50
Original comment by eclecticgeek
on 24 May 2013 at 3:00
Original issue reported on code.google.com by
sylvain....@gmail.com
on 21 Sep 2010 at 2:18Attachments: