The moose likes I/O and Streams and the fly likes send file to printer using java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "send file to printer using java" Watch "send file to printer using java" New topic

send file to printer using java

Thanuja Vishwanath
Ranch Hand

Joined: Oct 07, 2010
Posts: 49

Iam helping my sister for her 10th std project. She is developing a console application wherein editor has option to create,read,delete and copy a file and publisher has options to read and print a file. Have written code for create,read,delete and copy. But stuck with the print option. Requirement is

1) when a publisher logs in and selects print option then he will be asked to enter the file name to print (file which will be send to the printer).
2) publisher is allowed only to enter the file name
3) as soon as he enters the file name, the file should be send to the printer and starts printing without opening the file.

Is it possible to do this without opening the file ie. publisher should not be allowed to edit the file. so when he enters the file name instead of opening the file, just pass the file name to the printer to print.

Joe Ess

Joined: Oct 29, 2001
Posts: 8836

That depends on what the documents are and what the capabilities of your printer are. This topic and our AccessingFileFormats FAQ should get you going.

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
wood burning stoves
subject: send file to printer using java
Similar Threads
Inside a JSP, how to print a file located in a Websphere server ?
Almost ready to hand up: Just cleaning up and have a few questions
Need help with POS printer
Signed applet and printing
Publish/Subscribe with multiple subscribers (like a jms topic)