Link to home
Start Free TrialLog in
Avatar of Fender_21
Fender_21

asked on

print from jsp page

Hi,
I have an excel document ,and the entire document object is available in the jsp. I need to open a popup for print on click of a button and just print the document as it is .
How to go ahead with this . Need to do this from jsp and not from the jave class.

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of anilallewar
anilallewar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Fender_21
Fender_21

ASKER

Hi,
I have already implemented that. I have a HSSFWorkbook object which I need to print.
Window.print() works fine in terms of opening the popup and configuring the printer etc. But,
I don't need to print the page , rather the HSSFWorkbook object I want to pass to this print command.
How can I do this ?
Thanks
NO you cannot do that from the JSP other than printing what is in the current window.

What we followed was that on click of print button we used to open a new window that opened the same page minus the other stuff by checking a passed param in the JSP(isPrint) and then call window.print() on print button on that.