By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,261 Members | 1,688 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,261 IT Pros & Developers. It's quick & easy.

Specify Page Size and Orientation

P: n/a
I have different web pages that I want to automatically default to
either landscape or portrait when printing, depending on the page. Can
this be done with javascript.

Jul 9 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
wrote on 09 jul 2006 in comp.lang.javascript:
I have different web pages that I want to automatically default to
either landscape or portrait when printing, depending on the page. Can
this be done with javascript.
No, you will have to ask the user to set it manually.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 9 '06 #2

P: n/a
wi*********@gmail.com writes:
I have different web pages that I want to automatically default to
either landscape or portrait when printing, depending on the page. Can
this be done with javascript.
You can use CSS to specify the size of the page for printing:
<URL:http://www.w3.org/TR/CSS21/media.html#at-media-rule>
<URL:http://www.w3.org/TR/CSS21/page.html#page-box>
The browser's print routine will then have to figure out whether it
should rotate the page to fit the paper.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 9 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.