Reputation: 51
I made a HTML for a word document and created it via file_put_contents('document.doc', $html_source);
The problem is that the style used as following:
style='page-break-before:always'
Doesn't do anything.
Any ideas or solutions?
Here is an example of what I am trying to do: http://bytes.com/topic/html-css/answers/720863-page-break-html-word-email
Upvotes: 1
Views: 2792
Reputation: 21
This worked for me:
<div class=”WordSection1”></div>
I am was creating a word document from an HTML table.
Upvotes: 0
Reputation: 175
Microsoft Word will only recognize this style as long as it's applied to a <br />
element.
.pagebreak {
page-break-before: always;
}
<br class="pagebreak" />
Upvotes: 2