I'm wondering if there's a way to achieve this output programatically using phpdocx.
Is it possible that if the text content of a specific dom object is going to spread from the bottom of one page to the top of another, to automatically insert a page break?
Basically if I have a 20 divs class="contentDiv" to only have the full content of any div on a single page. I don't mean putting 20 divs on 20 pages... it could very well be 5 on one page, 12 on the second and 3 on the last. Just that it's never the case where there are 5.5 on the first page, 11.5 on the second and 3 on the last.
The content of the divs is dynamic and will vary a lot on each generation of the Word document.
addBreak seems to be basic add line/page break, but not with any parameters to achive my goal.
addParagraph has an option for pageBreakBefore, but it looks to be just a boolean on/off without an auto.
It looks like this functionality is fully implemented with PDF output in regards to the reflower which looks as if it checks current dom height against current page height and inserts page breaks appropriately. I'm sure that's just an advantage of PDF over Word as far as generated output. PDF may be fine for my solution..... can I pass generated html (php) page to phpdocx and have it do the above for pdf output?
Thanks.. hopefully that all makes sense.
Cheers