jQuery in Action, 3rd edition
The moose likes JSP and the fly likes Printing from a jsp page- java attributes...? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Printing from a jsp page- java attributes...?" Watch "Printing from a jsp page- java attributes...?" New topic

Printing from a jsp page- java attributes...?

George Larry
Ranch Hand

Joined: Nov 07, 2001
Posts: 52
I've heard that there is a way to set the printing attributes with java to make a printer print a document in landscape... does that carry over to jsp and web pages?
Does anyone know how I might set the default for printing something from my web page to 'landscape'? So if they just push the IE print button it'll automatically print in landscape?
If this can't be done with jsp (though... I sure hope it can be done with jsp) is there something else I could use?
Thank you.
chanoch wiggers
Ranch Hand

Joined: May 24, 2001
Posts: 245
(pressed Submit by accident)
you shoudl be able to set the alignment using CSS by putting
@page {size : landscape}
in the style section but I cant get it to work. In any case, this hasnt got anything to do with jsp or java because jsp pages are run on the server = by the time they arive in the browser, there is no jsp left in the page. so you cant control html page printing from java no. There is a way to do this for java applications but its an entirely different matter and involves the printing api
[ July 04, 2002: Message edited by: chanoch wiggers ]

chanoch<p><a href="http://www.amazon.com/exec/obidos/ASIN/1861007736/" target="_blank" rel="nofollow">Author of Professional Apache Tomcat</a></p>
I agree. Here's the link: http://aspose.com/file-tools
subject: Printing from a jsp page- java attributes...?
It's not a secret anymore!