Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2005

Tip: Looking for answers? Try searching our database.

printing from a web application question

Thread view: 
bahamuto - 03 Nov 2005 20:41 GMT
 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
Andrew Thompson - 04 Nov 2005 00:09 GMT
(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.
Thomas Hawtin - 04 Nov 2005 06:54 GMT
>   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
Signature

Unemployed English Java programmer
http://jroller.com/page/tackline/

Andrew Thompson - 04 Nov 2005 19:31 GMT
> 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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.