I would give up on doc files, they are too dependent on 'user' settings. pdf really is the way to go, it gives you all the control you need and then some, if your php isn't set up I would check out http://www.ros.co.nz/pdf I am not sure if any of the open source formats can include orientation etc. Patrick Sent from my Verizon Wireless BlackBerry -----Original Message----- From: gangadhara prasad <ngprasad20@xxxxxxxxx> Date: Fri, 25 Apr 2008 10:32:02 To:hyd-phpug <hyd-phpug@xxxxxxxxxxxxxxx>, php-objects <php-objects@xxxxxxxxxxxxxxx> Subject: [php-objects] How to set Orientation to Landscape and Default view to print layout? Hi Experts, I am retrieving url content and writing that content into doc files. Can you please check it in http://www.celltone <http://www.celltonet.com/urltodoc.php> t.com/urltodoc.php Enter these urls http://www.php. <http://www.php.net> net , http://www.microsof <http://www.microsoft..com> t..com in text box and click on "Create Doc".It creates doc file. By default it opens in web page layout and orientation is potrait.I need to set the Orientation is Landscape and Default view is print layout. My code is if(($_REQUEST['submit']=="Create DOC") && ($_REQUEST['urls']!="")) { $content = ''; $str1=trim($_REQUEST['urls']); $str=explode(",",$str1); for($i=0;$i<count($str);$i++) { if($str[$i]!="") { $handle = fopen(trim($str[$i]), "r"); $content1=stream_get_contents($handle); $content1 = str_replace("<head>", "<head>\n<base href='".$str[$i]."'>\n", $content1); $content .= str_replace("</title>","</title><p align='center'><strong>".$str[$i]."</strong></p>", $content1); fclose($handle); } } $content = str_replace("</body>", "", $content); $content = str_replace("</html>", "<p align='center'><strong><br style='page-break-before: always;' clear='all' ></strong></p>", $content); file_put_contents("urltodoc.doc",$content); header('Content-type: application/msword'); header('Content-Disposition: attachment; filename="urltodoc.doc"'); readfile('urltodoc.doc'); } How to set Orientation to Landscape and Default view to print layout? Thanks, Gangadhar Get the freedom to save as many mails as you wish. To know how, go to http://help. <http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html> yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html [Non-text portions of this message have been removed]