Connecting Tech Pros Worldwide Help | Site Map

printing in landscape automatically

Member
 
Join Date: Nov 2007
Posts: 43
#1: Sep 7 '08
Dear sir,

I have trouble with printing page with landscape. I am using java script to print the page. as well as I have set css file to print landscape but it is not working.

I have used these line in css files,

[HTML]<style type="text/css">
<!--
@page { size: landscape; }
-->
</style>
[/HTML]
it automatically takes the portrait (default one), but I wish to print landscape automatically. please assist me.

Regards,
Faruk Chowdhury
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#2: Sep 7 '08

re: printing in landscape automatically


You have to set the media property to "print".
Member
 
Join Date: Nov 2007
Posts: 43
#3: Sep 8 '08

re: printing in landscape automatically


Dear Sir,
Thanks for your reply.
i set the media property with print but it does not work.
so can you give me other suggesation?

Regards,
faruk Chowdhury
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#4: Sep 8 '08

re: printing in landscape automatically


Which browser(s) are you testing on?
Member
 
Join Date: Nov 2007
Posts: 43
#5: Sep 15 '08

re: printing in landscape automatically


Dear Sir,
i am tesiting on internet explorer version 6.0 .

Thanks in advance .

Faruk
Member
 
Join Date: Nov 2007
Posts: 43
#6: Sep 15 '08

re: printing in landscape automatically


Dear Sir,
i am tesiting on internet explorer version 6.0 .

Thanks in advance .

Faruk
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#7: Sep 15 '08

re: printing in landscape automatically


Do you want this to work only in IE6? I don't think IE6 supports the @page property, so you can try using this hack (hacks for IE - tell me something new)
Reply