printing from a web application question

B

bahamuto

Can this be done? I put a Java web application on the web server we
have, and I had it print a file to the default printing. It printed
fine, however it printed to the web servers default printer. I would
like it to print to the user of the web application's default printer.
Can that be done somehow, or how would one go about this?

--Nathan
 
A

Andrew Thompson

bahamuto wrote:

(print web page)
Can that be done somehow, or how would one go about this?

If 'one' is the user with an average browser,
alt 'f' 'p', will achieve it.

If one is the designer of the web page, one might
make this clear to the user by adding something like.

"<P>Use the 'print' function of your browser to get
a printed copy of this fine web page.</p>" *

* Note: Requires wetware API, not always installed.
 
T

Thomas Hawtin

bahamuto said:
Can this be done? I put a Java web application on the web server we
have, and I had it print a file to the default printing. It printed
fine, however it printed to the web servers default printer. I would
like it to print to the user of the web application's default printer.
Can that be done somehow, or how would one go about this?

Other than getting the user to print it themselves, you can use JavaScript.

http://www.google.com/search?q=javascript+printing

As this is a Java news group, you can write an applet and print (you'll
get a dialog box) or, IIRC, JNLP (Web Start) has a service providing
printing.

If it is in a suitably controlled environment, you could check the
clients IP (or MAC) address, and look up a printer from that.

Tom Hawtin
 
A

Andrew Thompson

Thomas said:
Other than getting the user to print it themselves, you can use JavaScript.

http://www.google.com/search?q=javascript+printing

As this is a Java news group, you can write an applet and print (you'll
get a dialog box) ...

Note that applies to the JS as well. If the web developer
can kick off a print on the client machine without the user's
direct and specific consent, it would become a far bigger problem
that a few 'pop-ups'.

Think of it. You (as an end user) are cruising around office
supply sites, only to discover later that each site has dumped
200+ pages of 'special offers' to the networked laser printer.

Site devleopers often have 'vital' information for the end-user
that the end user does not see as vital. The end user must have
the final say.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,173
Latest member
GeraldReund
Top