i need to create a .doc file that has more than one page. I want to create the doc file from html (setting the headers so that it is interpreted as a doc file) but i don't know how to add a page break in html that is correctly recognized from word.
Thanx in adv开发者_开发问答ance
You may find PHPWord to be useful.
PHPWord is a library written in PHP that create word documents.
Update:
Method One:
Here is a method using COM (requires Word to be installed)
Method Two:
Use appropriate headers, here is an example:
header("Content-type: application/vnd.ms-word");
header("Content-Disposition: attachment;Filename=document_name.doc");
echo "<html>";
echo "<body>";
echo "<b>My first document</b>";
echo "</body>";
echo "</html>";
精彩评论