File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Specialized printing from a JSP page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Specialized printing from a JSP page" Watch "Specialized printing from a JSP page" New topic
Author

Specialized printing from a JSP page

Mora Yung
Greenhorn

Joined: Dec 27, 2000
Posts: 5
Hi everybody.

I have a JSP page with some controls and a Print button. What I want it to do is when I click the Print button, the print dialog box would show. I would choose what printer to to send this job to. But when I press the button to start the printing, I don't want to print the "screenshot" of the page. Instead I want to send the contents of controls in a text format.

For example, the JSP page would have a text box with a value of "Hello World". So what I would like is to send just the text "Hello World" to the print queue.

Is this possible? How would I override the data that gets sent to the printer?

Any help is appreciated.
Thanks.

Dickson
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

You would have your print button submit a new request that returns the data in the format you desire. Javascript on the 'print page' could initiate the print sequence. If you don't want a new page to pop up, you could submit this to a hidden iframe on the original page and no one would be the wiser.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Specialized printing from a JSP page