Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Oct 2002
    Location
    || Canada ||
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Forced Landscape Printing

    I know that forcing a landscape or portrait printout from a webpage is probably not going to happen due to local settings...
    However, here's the situation:

    We have a map that stretches across two 8x11 regular sheets (portrait) and when we print it from our web page, of course you only get one half or if landscaped, more (no full) of the image.

    Other then shrinking the image to fit portrait size (which would greatly ruin the quality of the image) is there any way - other then turning (rotating) the image on its side - to possibly force the visitor to print landscape?

    The next best thing I can think of, is to simply suggest landscape printing...

    Geze, I hope that wasn't too confusing.


    thanks!

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    United Kingdom Confused: Often
    Posts
    859
    Thanks
    0
    Thanked 0 Times in 0 Posts
    redhead

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    NL
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The best thing I can think of is keeping two images on the server (one for viewing, one for printing), two images on your page (one for viewing, one for printing), and two stylesheets; again; one for viewing, one for printing.
    When the page is viewed, the div with the rotated image is hidden (display:none;).
    When a user wants to print it, the div with the portrait image is hidden and the rotated image visible. That's possible like this:

    <link rel="stylesheet" type="text/css" media="screen" href="style.css">

    contains:

    #print {
    display:none;
    }



    <link rel="stylesheet" type="text/css" media="print" href="print.css">

    contains:

    #view {
    display:none;
    }


    <div id="view"><img src="" width="500" height="300"></div>
    <div id="print"><img src="" width="300" height="500"></div>


    But the browser always loads two stylesheets and both images.

  • #4
    New Coder
    Join Date
    Oct 2002
    Location
    || Canada ||
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Wow great thanks.
    I'm going to suggest this to the fella respon' for this and see what he thinks.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •