Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Specify Page Size and Orientation

Reply
Thread Tools

Specify Page Size and Orientation

 
 
winstontuck@gmail.com
Guest
Posts: n/a
 
      07-09-2006
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.

 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      07-09-2006
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)
 
Reply With Quote
 
 
 
 
Lasse Reichstein Nielsen
Guest
Posts: n/a
 
      07-09-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) 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 - (E-Mail Removed)
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
automatically change page orientation to landscape when printing satnamsarai@gmail.com ASP .Net 2 06-14-2007 04:10 PM
Page Orientation wtuck@yebo.co.za HTML 3 07-05-2006 04:40 PM
Program IE Page Orientation =?Utf-8?B?TWlrZSBNb29yZQ==?= ASP .Net 1 03-07-2005 09:34 PM
Problem with Page Orientation of Excel Workbook While Streaming MIME Content Yelena Kaplun ASP .Net 1 01-19-2005 12:27 AM
<FORM METHOD="post" onSubmit="return fieldcheck()" name="orientation" action="http://ws-kitty.BU.edu/AT/survey/orientation/script/write.asp" language="JavaScript"> Joeyej ASP .Net 0 06-04-2004 07:55 PM



Advertisments