[英]HTML page break for word - page-break-before:always not working
I made a HTML for a word document and created it via file_put_contents('document.doc', $html_source);
我为Word文档制作了HTML,并通过
file_put_contents('document.doc', $html_source);
创建了它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 这是我要执行的操作的示例: http : //bytes.com/topic/html-css/answers/720863-page-break-html-word-email
Microsoft Word will only recognize this style as long as it's applied to a <br />
element. 只要将Word应用于
<br />
元素,Microsoft Word就只能识别该样式。
.pagebreak {
page-break-before: always;
}
<br class="pagebreak" />
This worked for me: 这为我工作:
<div class=”WordSection1”></div>
I am was creating a word document from an HTML table. 我正在从HTML表创建Word文档。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.