Print Page in Landscape format...!

  • asad_black
  • Graduate
  • Graduate
  • asad_black
  • Posts: 131
  • Loc: pakistan

Post 3+ Months Ago

hi,

i want to print my web page in landscape format...!

i already used the function of window.print() in javascript but its print the in normal form ...!

kindly provide me any code which print my page in landscape.
my page is totally depend on the table.


Regards,
Asad Mairaj
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • ScienceOfSpock
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1893
  • Loc: Las Vegas

Post 3+ Months Ago

Well, you could try using the CSS print media type with an @page rule:
Code: [ Select ]
<style type="text/css" media="print">
@page land {size: landscape;}
body {page: land;}
</style>
  1. <style type="text/css" media="print">
  2. @page land {size: landscape;}
  3. body {page: land;}
  4. </style>

Unfortunately, this only works in Opera. Last time I checked, IE and Firefox didn't even support @page. If you absolutely must have your page printed in landscape, you are going to have to just tell your users to make sure it's in landscape when they print it because there's really no way to force it.
  • asad_black
  • Graduate
  • Graduate
  • asad_black
  • Posts: 131
  • Loc: pakistan

Post 3+ Months Ago

ScienceOfSpock wrote:
Well, you could try using the CSS print media type with an @page rule:
Code: [ Select ]
<style type="text/css" media="print">
@page land {size: landscape;}
body {page: land;}
</style>
  1. <style type="text/css" media="print">
  2. @page land {size: landscape;}
  3. body {page: land;}
  4. </style>

Unfortunately, this only works in Opera. Last time I checked, IE and Firefox didn't even support @page. If you absolutely must have your page printed in landscape, you are going to have to just tell your users to make sure it's in landscape when they print it because there's really no way to force it.



my all clients use IE :-(
  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6252
  • Loc: Seattle, WA

Post 3+ Months Ago

Looks like you're just going to have to instruct your users to specify landscape when printing.
  • asad_black
  • Graduate
  • Graduate
  • asad_black
  • Posts: 131
  • Loc: pakistan

Post 3+ Months Ago

my problem has been solved by using following code:

.land{filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);

margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 73 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.