posted 15 years ago
Hi folks,
I have requirement for my current project, which needs user to print the page in LANDSCAPE mode. User o/s is Windows, browser is IE 6. I have tried using {WScript.Shell} but of no use, as that leads me to Printer-model specific setting. I want to get an ENUM of windows default-printer properties, and then pass a printer-property which will set the page orientation as "landscape". Please pass me suggestions.
I have tried this options:
<style type="text/css" media="print">
page {
size:landscape;
}
</style>
------------------------------------
<script>
var shell = null;
function SetPrintProperties() {
try {
shell = new ActiveXObject("WScript.Shell");
shell.sendKeys("^p");
setTimeout("shell.sendKeys('%R')",1000);
setTimeout("shell.sendKeys('%L')",1100);
//setTimeout("shell.sendKeys('{ENTER}')",1200);
//setTimeout("shell.sendKeys('{ENTER}')",1300);
}
catch (e) {
alert ("An exception occured: " + e + "\nCode is: " + e.number + "\nDescription is: " + e.description);
}
}
</script>
Refreshing life every moment...