Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Specialized printing from a JSP page

 
Mora Yung
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64708
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic