views:

53

answers:

4

How to Prevent PDF Document from Being download to users PC? it can be viewed on browser but should not download the file to PC.

Is it possible?

+1  A: 

if its viewable on browser its been downloaded

NimChimpsky
A: 

The browser will at least download it into its cache.

Bruno
+1  A: 

So you want the bits to get the to user so he can see them on his browser but you also don't want the bits downloaded to the PC? That's inconsistent and thus impossible.

Jason
A: 

One option is to render the PDF to JPEG or some other image format and only serve the rendered images to the user. Some of the PDF libraries allow you to render PDF's to other file formats.

Another option may be to send/redirect the PDF through to an online PDF viewing app in the same way Google does with attachments in GMail. That way the user sees a JPEG of the PDF and cannot download the PDF.

Andrew Cash