I create documents with php in word and pdf format
I use headers to create a document in a word
header("Content-type: application/vnd.ms-word");
header("Content-Disposition: attachment;Filename=example.doc");
echo "<html>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=Windows-1252\">";
echo "<body>"; etc etc
wysiwyg generates the following code to render pages
<div style="page-break-after: always;"><span style="display: none;"> </span></div>
This html / css works fine for pdf output, but not for word.
Can someone recommend an alternative method for creating page breaks that might work in a word.
source
share