Control Page Orientation

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
pcoder
Forum Contributor
Posts: 230
Joined: Fri Nov 03, 2006 5:19 am

Control Page Orientation

Post by pcoder »

Hi,
Can we control the default orientation of page to Landscape or portrait before printing a page from PHP.

Thanks
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Re: Control Page Orientation

Post by Kieran Huggins »

nope - it's purely a print dialog option.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Control Page Orientation

Post by VladSun »

I'm not sure whether it will work (browser dependent?)

Code: Select all

 <style type="text/css" media="print"> @page port {size: portrait;}@page land {size: landscape;} .portrait {page: port;} .landscape {page: land;} </style> 
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
pcoder
Forum Contributor
Posts: 230
Joined: Fri Nov 03, 2006 5:19 am

Re: Control Page Orientation

Post by pcoder »

It only works in Opera..
Any way thanks..
Post Reply