flemingmike Posted September 29, 2010 Share Posted September 29, 2010 hello, i have the following script, and it works great. one thing i need is to print in landscape. is it possible to modify this to set to print landscape? <head> <script><!-- function printURL(URL){ if(!window.print){ alert("Your browser does not support printing"); } else{ popup = window.open("about:blank", "", "fullscreen=no,toolbar=no,status=no,menubar=yes,scrollbars=no,resizable=no,directories=no,location=no,width=200,height=200"); popup.document.write("<html><frameset cols=*><frame src=\"" +URL+ "\" onload=\"window.print();setTimeout('window.close()',100) \"></frame></frameset></html>"); popup.location.reload(); } } --></script> </head <body> <a href="javascript:printURL('shortview.php?">print shortview</a> </body> Quote Link to comment https://forums.phpfreaks.com/topic/214770-modify-print-script/ Share on other sites More sharing options...
micah1701 Posted October 8, 2010 Share Posted October 8, 2010 I don't believe you can modify the users settings in javascript, however, you may be able to use some CSS to help in your page "shortview.php" add... <style type="text/css" media="print"> body{page:landscape} </style> and see if that helps. Quote Link to comment https://forums.phpfreaks.com/topic/214770-modify-print-script/#findComment-1120233 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.