Forum


Replies: 2   Views: 5652
Add page break in html
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 davelavinsky  · 25-10-2016 - 15:44

I have a large chunk of HTML code which I'm inserting it via embedHTML

$docx->embedHTML($html);

But I want to insert page breaks before all my <h2> tags. I tried with <br/> but it didn't work.

I can't use $docx->addBreak(array('type' => 'page')); because I'm inserting a large chunk of pre-processed HTML code in which I have the page breaks.

Is there any way to get this done in HTML ?

Im using phpdocx 5.5 Advanced.

Thanks