🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.reader
Article #14926

Java web app - sending .PDF output direct to user printer

#14926
From: Steve_Gallagher
Date: Fri, 04 Aug 2006 16:36
16 lines
1950 bytes
I have a real brain-teaser here (it may not even be possible). We have
a Java 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 see two possibilities:

1. is there something we can embed into the FOP source that gets converted into the .PDF that says "enable the Print button in Reader, but after the user presses it once, disable it"; or

2. take this FOP-generated .PDF outputand 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?
Technical Details
Message-ID: <3bc126f1.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!news.motzarella.org!news.ecp.fr!news.stben.net!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: 10273d,161e5580b3721ad0,start
X-Google-Attributes: gid10273d,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Steve_Gallagher@adobeforums.com
Newsgroups: adobe.reader
Subject: Java web app - sending .PDF output direct to user printer
Message-ID: <3bc126f1.-1@webcrossing.la2eafNXanI>
Date: Fri, 4 Aug 2006 09:36:58 -0700
Lines: 25
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!news.motzarella.org!news.ecp.fr!news.stben.net!webcrossing