aspose file tools*
The moose likes Beginning Java and the fly likes printing current webpage...! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "printing current webpage...!" Watch "printing current webpage...!" New topic
Author

printing current webpage...!

Renu Sadan
Greenhorn

Joined: Oct 12, 2011
Posts: 3
Guys, I've got a button "Print" on webpage. The page shows the billing statement . I want to print that billing statement but not the entire page. Is there any way i can restrict the whole page from getting printed and could just get the print for the billing statement table. Please help , and thanks in advance.



Regards
Ove Lindström
Ranch Hand

Joined: Mar 10, 2008
Posts: 326

rhenus Renu wrote:Guys, I've got a button "Print" on webpage. The page shows the billing statement . I want to print that billing statement but not the entire page. Is there any way i can restrict the whole page from getting printed and could just get the print for the billing statement table. Please help , and thanks in advance.

Regards


Normaly, you use a CSS that has print-prefix and then you just blank out all the things that should not be printed. Another way is to generate a PDF and let the user print or save that one.
Renu Sadan
Greenhorn

Joined: Oct 12, 2011
Posts: 3
@Ove Lindström : Can you please explain how to make it to pdf? And how can one download it?
Ove Lindström
Ranch Hand

Joined: Mar 10, 2008
Posts: 326

Renu Sadan wrote:@Ove Lindström : Can you please explain how to make it to pdf? And how can one download it?


Use iReport, Jasperreports or any other PDF-generator library to do that. But easiest way, if you already have a HTML page is to create a new css that strips the "non printable" areas.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: printing current webpage...!