Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting Printer Page Orientation in HTML

Status
Not open for further replies.

TStriker

Programmer
Nov 12, 2003
277
US
Hi folks,

I think I already know the answer to this but is it possible to add a link to a page that will make the print dialog box come up with landscape selected as the default?

-Striker
 
no.
activex controls might allow you to do this in some ways, but are not cross-browser friendly nor worth the trouble.

look into, instead, styling your page differently for printing. you can have two stylesheets for your webpage - one for screen and one for printing, if desired.

*cLFlaVA
----------------------------
[tt]I already made like infinity of those at scout camp...[/tt]
beware of active imagination: [URL unfurl="true"]http://www.coryarthus.com/[/url]

[banghead]
 
That's what I thought. Cross browser is not an issue because this is for an intranet. I have created a specific stylesheet for printing but the page has lots of columns in a table and it really fits much better if it is printed landscape. I guess I'll have to rely on the folks to remember to choose landscape.

-Striker
 
just do an alert. it's simple enough.

Code:
function doPrint() {
   alert("Don't forget to choose LANDSCAPE layout!");
   window.print();
}

Code:
<a href="#" onclick="doPrint(); return false;">Print Me!</a>

*cLFlaVA
----------------------------
[tt]I already made like infinity of those at scout camp...[/tt]
beware of active imagination: [URL unfurl="true"]http://www.coryarthus.com/[/url]

[banghead]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top