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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to print landscape in javascript?

Status
Not open for further replies.

Plato2

Programmer
Dec 6, 2002
192
US
Is it possible to print landscape in javascript?

Thanks
 
I would have immagined so but only thing I know off hand is:

document.body.style.filter='progid:DXImageTransform.Microsoft.BasicImage(rotation=1)';

Dunno if it helps but it might... :p

----------
I'm willing to trade custom scripts for... [see profile]
 
Forgot to mention that it's IE only. There may be something similar for Mozilla.. not sure :/

----------
I'm willing to trade custom scripts for... [see profile]
 
If no other solution is forthcoming, you could fire the rotations using the following though that may cause your site visitors some confusion ;)

window.onbeforeprint=
window.onafterprint=

----------
I'm willing to trade custom scripts for... [see profile]
 
I tried the way you suggested:
.rotate{
filter: progid:DXImageTransform.Microsoft.BasicImage(Rotation=1);
}
It does print landscape but only the first page and a duplication of that page.

Any ideas why?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top