This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Print in A5 size Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Print in A5 size" Watch "Print in A5 size" New topic
Author

Print in A5 size

Deeps Mistry
Ranch Hand

Joined: Jan 31, 2009
Posts: 189
Hi ,

I have a jsp page with a Print button on it. On click of the print button i want to do the following:
1) remove headers and footers.
2) print the page on A5 size paper.

Thanks.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
It is only supported in CSS3, which most browsers do not support.

Eric
Deeps Mistry
Ranch Hand

Joined: Jan 31, 2009
Posts: 189
Eric Pascarello wrote:It is only supported in CSS3, which most browsers do not support.

Eric


so i will have to select the page size every time i click on print button?
Also, cant i remove headers/footers in html on click of print button?


Thanks
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
The headers and footers.

If you are talking about the page number, address, etc, you can not remove that. That is a browser setting that has to be removed by the user.

If you really need to control the look and feel, you may want to generate a pdf version and have the user print that.

If you are looking at IE only, there are ActiveX controls that can do most of this. Problem is most places have ActiveX disabled.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Print in A5 size