I wish to print landscape automatically. please assist me.

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
avmohankumar
Forum Newbie
Posts: 14
Joined: Fri Jun 08, 2007 7:20 am

I wish to print landscape automatically. please assist me.

Post by avmohankumar »

Dear friends,

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,

<style type="text/css">
<!--
@page { size: landscape; }
-->
</style>

it automatically takes the portrait (default one), but I wish to print landscape automatically. please assist me.

regards,
maza
User avatar
andym01480
Forum Contributor
Posts: 390
Joined: Wed Apr 19, 2006 5:01 pm

Post by andym01480 »

Can't be done I am afraid - landscape/portrait choice is a user only choice. Can't be forced! Even by CSS

But when I needed a landscape print document for a user I used PDF which can force it. use http://www.fpdf.org - it is pretty good.
avmohankumar
Forum Newbie
Posts: 14
Joined: Fri Jun 08, 2007 7:20 am

Post by avmohankumar »

I want to work on the browser IE internet explorer.
Post Reply