File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes I/O and Streams and the fly likes Client side Printing Problem  in JEE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Client side Printing Problem  in JEE" Watch "Client side Printing Problem  in JEE" New topic

Client side Printing Problem in JEE

Eranga Kodikara

Joined: Jan 18, 2010
Posts: 2
hi all

how can i print text file using client side environment through web browser
n also i wanna print directly without appearing print dialog box ?


Joe Ess

Joined: Oct 29, 2001
Posts: 9189

Welcome to the JavaRanch.
The short answer to your question is: you can't. Letting an application in a browser have access to valuable system resources is a breach of security.
There are some alternatives. I worked an enterprise system where we had a "print" button on an applet that actually printed from the server. This was not a security problem since the application was not used by the world at large. Another alternative would be to create a signed applet. The application signature identifies the creator of the application and insures it has not been tampered with, so signed applets are given much more flexibility.

[How To Ask Questions On JavaRanch]
I agree. Here's the link:
subject: Client side Printing Problem in JEE
jQuery in Action, 3rd edition