I don't think that there's a method of controlling this from a Web page,
though somebody else may know otherwise. I suspect there's a
security issue with this.
However, in IE you can use the onbeforeprint event, in conjunction with an
XML templateprinter element to ascertain current printer settings.
Then, if (pageHeight>pageWidth), you know you don't have landscape
settings, and can prompt the client to re-set for landscape, then open
up a printer control dialogue box for him/her.
You can also use a separate stylesheet (media="print") to prevent printing
until the printer is set for landscape. Toggle the body display property to
enable/prevent printing. Or if IE5.5, set the zoom property to shrink width
to a size small enough to fit within print margins (which you can also query)
if a printer is set for portrait. Alternatively, set up layout in a printer stylesheet
to print okay in portrait in the first place. Layout for the printer needn't look
anything like screen layout.
Refer:
- Peter
In IE you can also use ScriptX from http://www.meadroid.com/scriptx/
which will give you access to all sorts of printing features with
their activeX.
Jim.
--
FAQ: http://jibbering.com/faq/
Old FAQs: http://jibbering.com/faq/old/
--
Kien
www.caoxuan.com
If you value your visitors,
don't mess around with their browsers.