开发者

I'm generating a word document with PHP, how do I make a page break?

I'm generating a word document with PHP (HTML with ms-word header), is there a way make a page break ?

Right now I'm witing a lot of <p>&nbsp;&开发者_如何学Golt;/p> until the page changes, but that's far from satisfying.


I've not tested to see if it works, but you could try:

<div style="page-break-before:always" />


A page-break has no meaning in HTML. It's more elegant to mark up the text which should be on the next page with, let's say

Header

. Then, in MS Word, create a style named "H2", and set it to "Page-break before" (Format/Paragraph/Line and Page Breaks).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜