Thanks to people who replied to my request for help.
The answer to my problem was quite simple when you know how!
This is to use the Location type code. "Location" passes back to the
browser that the browser needs to request the URL specified in Location.
The server then responds by sending the requested URL. This
method will (eventually) send the actual document for display in the main
window with only a single button click. (Thanks to [log in to unmask]).
>
> We are displaying documents on the web as PDF files. But
> because we want to log when a user views one of these files,
> for later evaluation studies, the hypertext link the user
> clicks calls up a cgi-script rather than just downloading
> the PDF file. This script performs some logging action
> before passing on the PDF file to the user's browser, which
> it does by preceding the file's contents by "this is of
> type application/pdf". Ie. the script looks like:
>
> #!/bin/sh
> #Perform some logging
> echo Content-type: application/pdf
> echo
> cat $PATH_INFO
>
So the script becomes:
#!/bin/sh
#Perform some logging
echo Location: $PATH_INFO
echo
[Relative path names are based from the CGI script URL.]
> This worked OK using Acrobat Reader 2.1 as a helper
> application in Netscape 2.1.
>
> But it no longer works with Acrobat Reader 3.0 as a plug-in
> to Netscape. Netscape kicks off the Acrobat Reader, and
> displays the message 'Document Done', but the document
> doesn't appear in the Netscape window.
>
> I think this is because Acrobat 3.0 expects a file with a
> .pdf extension as well as the 'application/pdf', which it
> obviously isn't getting in this case.
>
Another solution was to utilise the new Adobe Byte Server script, which is
to be used for byte serving a page at a time when viewing PDF documents over
the web. So the following script also works:
#!/bin/sh
#perform some logging
byteserv.pl
[Relative path names are based from the byteserver.pl CGI script URL.]
We do not really want to use the server's log files to find who has accessed
which PDF file, because we would then have to tie this information into
the rest of our logging. We want to keep the process of reading log files as
simple as possible.
Ann
PS. Has anyone tried viewing optimised PDF files over the web using the Byte
Server? All the files I have optimised using Acrobat Exchange Beta 3.0 (which
I downloaded from Adobe) show errors (like parsing errors) when I try to
view them over the web (whether byte served or not). The unoptimised files
view OK. I have reported this to Adobe, but I am not impressed!
----------------------------------------------------------
Mrs. Ann Apps.
SuperJournal Project, National Services Group,
Manchester Computing, University of Manchester,
Oxford Road, Manchester, M13 9PL, UK.
Tel: +44 161 275 6039
Fax: +44 161 275 6040
Email: [log in to unmask]
WWW: http://www.superjournal.ac.uk/sj/
----------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|