• Post Reply Bookmark Topic Watch Topic
  • New Topic

jsp/servlet automatically print to non local printer  RSS feed

 
Terri-Lynn Newfie
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just started working at a company that wants me to make a online webapp that can generate reports and print it to a printer that may not be on the local computer. Also, they have a little receipt printer that they want to be able to print from online. Is there anyway that this is possible?
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use JavaScript, window.print(), to print a page. Whatever printer you configured on your machine would do that job.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Javer Chick
Welcome to JavaRanch!

We're pleased to have you here with us in the JSP forum, 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.

You can change it here.
[ December 22, 2005: Message edited by: Ben Souther ]
 
Terri-Lynn Newfie
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is Javer Chick....
I was actually wondering if u could get it to automatically print without the user having to know which printer it's sapose to be going to. and is there a way to know which computer it's printing from? He wants to keep track of whos making what transaction and where.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Printing with Javascript's window.print really has nothing to do with JSP.
Javascript is run in the client's browser (client side code).

I believe the browser will just write to the default printer for the machine where it resides. I doubt that there is much a web app could do to change that.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!