Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Print API For Web based Applications?  RSS feed

 
vikram nalagampalli
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am working on the web based application, which requires certain information to be printed out to the clients prrinter, when something fails. I am using java.awt.print to have this acheived, but the problem is the print dialog pops up on the server instead of the users Browser.
I will really appreicate if some one can help me acheive this on web based application, using Java Print API or anything other available up there.

Thank you
vik
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have two choices:

1. run the print stuff on the client's machine (i.e. an applet)
2. find the user's printer and queue the job over the network.

1 is easy enough. 2 however is not. You would need all clients to be on the same network as your server. Print jobs generated by the Printing API tend to be very large (everything is an image) so you may well take a big performance hit trying this. Users would have to set the name of their printer in your app (you can't just call the default, because as far as the serverside code is concerned, the default printer is whatever is set up as default on the server). So I wouldn't recomend it.
[ June 04, 2004: Message edited by: Paul Sturrock ]
 
vikram nalagampalli
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Paul,
Thanks for your comments...I am wondering jdk1.3 Print API has the ability to locate the Printer on the same network the server is running.

I am ok even if i can hardcode the printer in my app where i want the print to be spooled. Can any one provide me a way to do this.

Thank you

vik
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!