View Full Version : Forced Landscape Printing

11-26-2002, 03:32 PM
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. :o


11-26-2002, 06:59 PM
try this...


11-26-2002, 07:14 PM
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">


#print {

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


#view {

<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.

11-26-2002, 07:51 PM
Wow great thanks.
I'm going to suggest this to the fella respon' for this and see what he thinks. :)