Forum Moderators: open
Thanks.
<script type="text/javascript">
var shell;
function SetPrintProperties() {
try {
shell = new ActiveXObject("WScript.Shell");
shell.SendKeys("%fu");
window.setTimeout("javascript:SetPaperSize();", 1200);
window.setTimeout("javascript:setLandScape();", 2000);
} catch (e) {
alert('Please verify that your print settings have a Landscape orientation and minimum margins.');
}
}
function SetPaperSize() {
shell.sendKeys("%a{TAB}.2{TAB}0{TAB}0{TAB}0{ENTER}");
}
function setLandScape() {
shell.sendKeys("%fp");
window.print();
}
</script>
<body onload="SetPrintProperties()">
See:
[w3.org...]
[meyerweb.com...]
____________________________________
In the <head>:
-------------
<link rel="stylesheet" type="text/css" media="print" href="myCssFolder/myPrintFile.css">
____________________________________
In myPrintFile.css:
-------------
* {
size: landscape;
}
____________________________________