Specify Page Size and Orientation

Discussion in 'Javascript' started by winstontuck@gmail.com, Jul 9, 2006.

  1. Guest

    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, 2006
    #1
    1. Advertising

  2. Evertjan. Guest

    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)
     
    Evertjan., Jul 9, 2006
    #2
    1. Advertising

  3. 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 -
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
    'Faith without judgement merely degrades the spirit divine.'
     
    Lasse Reichstein Nielsen, Jul 9, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Yelena Kaplun
    Replies:
    1
    Views:
    5,218
    Yelena Kaplun
    Jan 19, 2005
  2. =?Utf-8?B?TWlrZSBNb29yZQ==?=

    Program IE Page Orientation

    =?Utf-8?B?TWlrZSBNb29yZQ==?=, Mar 7, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    1,513
    John Timney \(ASP.NET MVP\)
    Mar 7, 2005
  3. Page Orientation

    , Jul 5, 2006, in forum: HTML
    Replies:
    3
    Views:
    2,304
    Jonathan N. Little
    Jul 5, 2006
  4. Replies:
    2
    Views:
    1,520
  5. brett
    Replies:
    0
    Views:
    780
    brett
    Sep 1, 2007
Loading...

Share This Page