Is there a way to view a premium PDF file, instead of it being able to download? We do not want our members to be able to download, print, or save the PDF File. Instead we just want it to open up in their browser to view. How can this be accomplished? Thank you.
You will need to use a script to send the pdf inline, please be aware that even if you say it is inline the user is still able to save it using the browser. Also, it will only be viewable if the browser has the pdf plugin installed (not all browsers have it as default). PHP: <?php$file = './path/to/the.pdf';$filename = 'Custom file name for the.pdf'; /* Note: Always use .pdf at the end. */header('Content-type: application/pdf');header('Content-Disposition: inline; filename="' . $filename . '"');header('Content-Transfer-Encoding: binary');header('Content-Length: ' . filesize($file));header('Accept-Ranges: bytes');@readfile($file); That should work, not tested though .. from stackoverflow was too lazy to type it myself ;-)
The above supplied script is basically the same as I use on my site for downloading PDF files. It will, depending on browser settings, offer the choice of opening or saving the file so will not accomplish what original poster was looking to do.
As I think I said ... forcing display only of anything with the intention of not allowing a copy is not really reliable. If it is displayed it is available to copy, ie drag it from the cache and save it if you want to put the effort in.
In short - NO, it is not possible... Anything that can be viewed can be printed/downloaded. You can make it harder - e.g. by storing files publicly in Google Drive and ticking to 'prevent downloading' but nothing can stop printing of information (e.g. by printing screen) Cheers Rob