Q:

How to prevent downloading PDF file when displaying on web pages?

How to prevent downloading PDF file when displaying on web pages? 
I tried the content disposition inline  but it didn't work.
How can i do this ?

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.

