[Xitami] block downloading PDF files to local machinewhenviewingthem online

RuneImp runeimp at gmail.com
Tue Apr 25 09:18:43 CEST 2006


On 4/21/06, Zheng Huan Qun <elezhq at nus.edu.sg> wrote:
>
> I have tried it. The PDF file is password protected but still is downloaded
> to local machine. Is there any other method to let user view file only
> without downloading it to local machine?
>
>
> HQ
>
>

If I understand you correctly you want people to be able to view these
PDFs but when someone clicks a link to one their browser prompts them
to download it instead of displaying the file. If that is the case
there are a few things to review.

1) The server needs to be setup with the correct MIME type. See
http://www.imatix.com/html/xitami/index4.htm#TOC45
The proper MIME type for PDF is application/pdf
Without that most browsers with the exception of IE on Windows (and
possibly Mac) will try to download the file becuase they don't know
what it is.
2) The browser viewing the site must have the ability to view PDFs.
This is a plug-in that is optionally installed when you install the
Adobe Reader on your computer and most browsers do not have it
installed. Modern browser if supplied the correct MIME type will
usually ask the user if they would like to attempt to open the file in
the appropriate file viewer though.

I hope that clarifies things a bit.  :)

--
RuneImp
Sr. Flash Developer
Kremsa Design



More information about the Xitami mailing list