"Steve G" <firstname.lastname@example.org> wrote in message
I have a real brain-teaser here (it may not even be possible). We have
a web app, it will run across the INTERnet (not intra). The app will
generate reports. Currently what we do is:
1. generate the report (over on the server, obviously) as a .pdf file
2. once done, we forward the user to the URL of the .PDF file
3. Since IE knows what to do with filetype .PDF, he kicks off Adobe
Reader and loads the .PDF in the new window.
For non-technology-related reasons, we can't do it this way (the user
must not be allowed to print the output more than once, and of course
once we dump them into Adobe Reader they can hit the Print button all
day, no way for us to stop them).
So we need to figure out how to take this output (we're generating it
with FOP) and dump it out to the user's printer (in other words, we
don't display the file, thereby allowing them to print multiple times;
we simply print it). I'm thinking with the code and the output file
over on the app server, there really isn't a way for me to direct this
output to the printer of a user who is running our app through IE. Or
am I wrong? If I'm right, can anyone think of another way to achieve
this result? Thanks as always.
I'm going to assume for the moment that it's possible for your web app via
it's returned page and a suitably privileged applet (including helper JNI
or Active-X control) to directly invoke the user's printer, bypassing even
the standard dialog box because it asks for the number of copies and can
be controlled from console.
Instead, let me ask how are you going to prevent the user from sticking
the output into a copier? Although I realize that documents can be
printed in such a way that they cannot be properly photocopied, I doubt
that most users' printers produce such output. This also doesn't consider
the very common cases where the printer jams or otherwise fails and the
document must be reprinted.
I'm asking this because I have seen too many cases where management has
insisted on complex, draconian restrictions that are utterly worthless. I
think the answer to your question is that it is possible using some very
sophisticated companion technology and a great deal of trust on the part
of the user, but that it seems pointless to do so.
but actually the output is stored in a file on my harddrive. I'd simply tell
copy of the original document, which can be printed unlimited times.