• Post Reply Bookmark Topic Watch Topic
  • New Topic

Changing the Print parameters through JSP

 
Blessed One
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I need to allow the user to take a printout of the HTML page, contents of this page are passed from a JSP page, is there a way

1. I can control the SIZE Header and the footer and
2. Printout SHOULD NOT have the following
1) Form name,
2) Page number like " Page 1 of 2 "
3) URL of the HTML Page being printed
4) Date of the printout

Could someone tell me how this can be achieved?

Thank U!
 
Rohit Bhagwat
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friend

I dont know whether the conditions you mentioned are satisfied by the following code or not. But you can try this.

you can use javascript for printing.

use window.print() method and it will print the current page.

<script language="javascript">
window.print(1);
</script>

Regards
Rohit.
[ March 14, 2005: Message edited by: Rohit Bhagwat ]
 
Blessed One
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Rohit...

Actually I am focusing on the controlling the print parameters....
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Blessed One",

We're pleased to have you here with us on the Ranch, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!