Is there a feature to require a minimum height on the page before drawing a div, and if not, break to the next page?
I have a lot of divs in a long list of divs, and now and then, three divs occur after each other that I want grouped together on the same page.
I'm looking for something like:
<require_page_space min_height="40mm">
<div>My first DIV</div>
<div>Second DIV</div>
<div>Third DIV</div>
</require_page_space>
...where it would break before the first div if there isn't at least 40mm of space available on the page.
Does something like this exists?
I tried to make this tag myself since I figured it would be quite easy, but inside my _tag_open_require_page_space() function, how to I get where the "current" insert point of the PDF is? I figured this would be $this->pdf->GetY() and $this->pdf->GetX() but it seems these are always 0? I found methods to grab the page height, the top/bottom margins etc, so I guess all thats left to figure out is the page position we're currently at, and then I can call $this->_setNewPage(); to force a new page prior to rendering my content.
Hi talonlzr can you please help me for find a solution for my problem. I am loading a page with dynamic data. I have different section each section contains heading and data's. The issue is when the section is end and the new section if the page only contains space to accommodate the section title, only in such case can i able to move the title to next page . Can you please help me.