Replies: 1   Views: 2670
Replacevariablebyhtml > force page break
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by sam3d  · 28-12-2017 - 18:45

We use replaceVariableByHTML to insert html. 

We also need to force page breaks from that html in situations where the page may still have room for more content. 

We have tried things like: 

$html .= '<p style="page-break-before;">page break</p>';

How can we force a page break from within dynamic html? 

We cannot use $docx->addBreak because we can only use one variable for use with replaceVariableByHTML.

We could use embedHTML if that allows forced page breaks.