Printing in landscape

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Jun 2005
Posts: 2
Reputation: Rupak is an unknown quantity at this point 
Solved Threads: 0
Rupak Rupak is offline Offline
Newbie Poster

Printing in landscape

 
0
  #1
Jun 9th, 2005
Help me out in Printing the Web page in Landscape Mode, forcefully.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,212
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 489
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: Printing in landscape

 
0
  #2
Jun 9th, 2005
What exatly is the problem???

You whant to print something as landscape or setting for your site???
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 2
Reputation: Rupak is an unknown quantity at this point 
Solved Threads: 0
Rupak Rupak is offline Offline
Newbie Poster

Re: Printing in landscape

 
0
  #3
Jun 9th, 2005
I would like to print a Web page in landscape mode. When I use window.print() function it prints default in Potrait mode.

I need to print the Web page in Landscape mode with out asking the user to change the setting.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,212
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 489
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: Printing in landscape

 
0
  #4
Jun 9th, 2005
Someday, browsers will pay attention to the size property of @page CSS rules:

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. @media print {
  2. @page rotated {size: landscape}
  3. }

More info http://www.w3.org/TR/1998/REC-CSS2-1...l#propdef-page
or http://www.daniweb.com/techtalkforums/thread14877.html
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 1,655
Reputation: tgreer is an unknown quantity at this point 
Solved Threads: 35
Team Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: Printing in landscape

 
0
  #5
Jun 9th, 2005
The JavaScript window.print() method simply passes a print request to the underlying OS, which will bring up a dialog box. The user will select portrait or landscape from that box. In other words, print orientation is up to the user, as it should be in my opinion.
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 354
Reputation: Troy is an unknown quantity at this point 
Solved Threads: 5
Troy's Avatar
Troy Troy is offline Offline
Posting Whiz

Re: Printing in landscape

 
0
  #6
Jun 9th, 2005
tgreer is right. I agree with tgreer that the user should always be allowed to have control over the print attributes. However, I do wish there was a way that the web developer could indicate printing defaults for a document that then the user could override if they wanted.

There are ActiveX components to do this. (Probably Java applets as well.) I used an ActiveX component once that worked by allowing you to specific things such as the page header and footer, portrait or landscape, etc. The component then saved the user's settings, temporarily changed them, sent your page to the OS for printing, then restored the user's page settings.

Check out http://www.meadroid.com/scriptx/index.asp. It's the component I used before.
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 1
Reputation: Vikcy is an unknown quantity at this point 
Solved Threads: 0
Vikcy Vikcy is offline Offline
Newbie Poster

Re: Printing in landscape

 
0
  #7
Jun 22nd, 2005
Hi,

I found this code source that can be use to print in landscape mode.

In HEAD tag you must put:

<style type="text/css" media="print">
div.breakbefore
{
page-break-before:always
}

table.page
{
filter: progidXImageTransform.Microsoft.BasicImage(Rotation=3);
}
</style>


After BODY tag you must use a TABLE tag that contais all content of the page:

<BODY>
<TABLE class="page">
... Your page ...
</TABLE>
</BODY>
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 1
Reputation: achisolomon is an unknown quantity at this point 
Solved Threads: 0
achisolomon achisolomon is offline Offline
Newbie Poster

Re: Printing in landscape

 
0
  #8
Sep 27th, 2006
doesn't work! agrrrrrrrrrr...

any1 has any other suggestions?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC