Larry wrote:
I'm developing a web app. Is it possible to allow the user to just
click once, and have my app fetch many image files from the server and
print them all on the user's printer (with no further user
interaction,
including dialog boxes from the client OS)? I'm thinking it may be
possible to do this with a signed applet. Is this the best direction
to be going? Also, are there any products out there that I could use
instead of writing it all from scratch?
Once the user authorizes a printout your page must already have all the
elements to be printed loaded. This is actually not hard to do. Just
have a hidden division which will be printed out. For example..
<div id='noprint'>All the visible stuff on the screen</div>
<div id='willprint'>All the stuff which will be printed out</div>
In this case on the screen noprint will have a style of display:block
while willprint will have a style of display:none.
You'd then create a css element...
@media print {
.noprint {display: none}
.willprint {display: block}
}
Now when the user hits print, noprint will be hidden and willprint will
be displayed -- at least to the printer. It's a bit of a bait and
switch but it's very useful for removing navigation and advertising
elements which have no business on a printout.
--
http://www.hunlock.com -- Musings in Javascript, CSS.
$FA