Hi Experts, I am retrieving url content and writing that content into doc files.
Can you please check it in http://www.celltonet.com/urltodoc.php Enter these urls http://www.php.net , http://www.microsoft..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 Did you know? You can CHAT without downloading messenger. Go to http://in.messenger.yahoo.com/webmessengerpromo.php/ [Non-text portions of this message have been removed]