Forum


Replies: 5   Views: 3719
Pagebreak
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 acanthis  · 23-10-2013 - 20:40

Hi! I'm creating a docx file from the html code. What should I add html code to the page break occurred? 



Thanks.


Posted by jorgelj  · 24-10-2013 - 09:39

Hi,



You can use this CSS style:



{page-break-before:always;}



Regards.


Posted by acanthis  · 24-10-2013 - 15:00

Could you show an example?


Posted by jorgelj  · 25-10-2013 - 08:52

Hello,



This is a simple example:



require_once '../../classes/CreateDocx.inc';



$docx= new CreateDocx();



$html= '<p><span>This is a page</span></p><p style="page-break-before:always;"><span>This is other page</span></p>';



$docx->embedHTML($html);



$docx->createDocx('../docx/example_embedSimpleHTML');



Regards.


Posted by acanthis  · 25-10-2013 - 13:03

Thanks