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

Print landscape code not working

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
Hello,

I'm trying to set a webpage to landscape when the print button is pressed (i.e. I have a button that issues 'print();').

I found some forums stating this code should work with IE7
Code:
@page { size: landscape; }
but it doesn't seem to.

Have I got the code wrong?

Can you set the print orientation via JS or CSS ?

Any help appreciated.

Cheers,
1DMF

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Thanks but they don't work.

The 'writing-mode: tb-rl' screws it right up seings as it's a form i'm trying to print landscape with floated fieldsets.

if I add the filter 'filter: progid:DXImageTransform.Microsoft.BasicImage(Rotation=1);'

I get a blank page printed, infact I get two pages printed with nothing but footers.

So I guess it's not possible to get a page to print landscape, why they removed it from the CSS2 spec is a mystery, but then again printing under windows always has been a nightmare and I guess always will be!



"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top