The following code generates a MS Word document in portrait format. But I need it to be in landscape mode as I’m inserting some tables, charts and similar multimedia stuff.
<?php
$fp = fopen("tx1.doc", 'w+');
$str="here goes some of my content";
$str.="- -I insert tables, charts and all the stuff with alignment--";
fwrite($fp, $str);
fclose($fp);
?>
So I wanna know how I can force php to generate the document in landscape format (landscape suits my presentation).
EDIT: as suggested by @Mark Baker I found solution to all of my requirements at one spot/shot github.com/PHPOffice/PHPWord Thanks. Now I can do anything with Doc 😉
You may try this to generate rtf document.
http://www.phpclasses.org/package/1805-PHP-Create-RTF-documents-from-HTML.html