ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

server-side configuration Open to View PDFs in browser not download them

(1/4) > >>

This is a pretty urgent need and i would be willing to looks at any alternatives.
In the past years, this was not really problem and I am not sure when the rules changes nor with what software.
On a site we host there are hundreds of pdf files in various library's. 

The Intent is for a User to be able to Open and view the files as much as necessary but other than making a screenshot, they should not be able to download and save the original PDF from the site.

This is a standard Apache Website using a PHP/MySQl setup to manage the documents.  I have tried inserting a few suggested code snippet with no results.  The same sites never acted this way before but i am unable to determine when this new "Download first/Open 2nd" ability became the default.

People visiting the website DO need to be able to view the files but I am beginning to believe it would be best (IF Possible) to find a way to
allow them to view it using a viewer hosted on the Web Server as the only way to accomplish what is needed

And there are so many other PDF viewers out there that I am sure attempts to prevent this after the file is already in their temporary internet files would be a waste

Any Advice Apprciated

Stoic Joker:
The Intent is for a User to be able to Open and view the files as much as necessary but other than making a screenshot, they should not be able to download and save the original PDF from the site.-questorfla (March 03, 2016, 12:59 AM)
--- End quote ---

I honestly can't fathom how that would be possible, as all web content is downloaded before being displayed. DRM (ick) can try to prevent print/save/etc. but for the truly creative there are always options for circumventing it.

These users that you're trying to prevent are internet users, correct?

Yes, these are internet users.  And to be honest, "I" personally have no issue with the downloads anyway and I have explained to the >"Powers That Be"< that these files have "ALWAYS" been downloaded.  If they (the viewing person) sees it, they have downloaded it.  The differences are that in the past, this download stayed in their Temporary Internet files and was a random number for a title.

Please remember that I am speaking of "Ordinary Mortals" here and not anyone who has even a shred of an idea how things really work.  So these "Internet visitors" who come to the website to view these files, all I am trying to do is to either get it to work like it used to such that the files and up in the temporary Internet folder as random numbers     >  OR

In some way manage to control how much further they are able to disseminate what they see.  I am well aware the there are hundreds of ways to "cheat" but this issue is about normal use by normal "non-technical" people.   The only reason this even came up was that one of the clients happened to noticed that a laptop they had been using which was not their own but rather one that was to be returned to a "stockpile" contained copies of all these documents they thought they were only viewing now stored in the downloads folder.  While the files are not "secret" they are also not something that was mean to be shared with the next user of that laptop.  This "storage in the downloads folder" is something that has occurred relatively recently, viewing pdf files did not work like this in the recent past, maybe 6 months ago?   I am not sure when I first noticed it but I have known that eventually this issue would come up.

I have considered things like encryption with the file unable to be read without a "key" which could be provided to the people who are reading them ("I"  know this is a dumb idea and pointless as the reader could simply supply that key to anyone along with the encrypted file  But you would be surprised at how many people will BELIEVE that this would help and belief in something even when wrong is sometimes all the "cure" that is needed!)

Anything I can do "server side" to make things "Look" like they used to is what I am trying to find right now.  A way to either automatically prevent the downloading of the file to the downloads folder where it looks like a normal pdf file with name title body etc.    OR    If it IS downloaded to go back to putting it in the temporary internet files folder stored under a random bunch of letters and numbers.

Eventually, the ideal solution would be a way to do something on the “Server-Side” to make the file >"unusable/unreadable"< by anyone beyond the person who was given the link to the website.  The Pdf's are already set with every protection offered by Adobe but almost everyone these days knows plenty of ways to by-pass that type of password protection.  Fortunately, this is not a "High Security" Issue but more one of "What They Want the Site To Do".  I would be more than willing to use a different file type, or any other option that would achieve this. 

Please keep in mind that for a “Quick Fix”  a "Trick" is as "Good as Gold" in this case.  If the "TRICK" works to make it seem as though there is not a copy of that file on the viewer's system that can easily be passed around to anyone they please, I am dealing with people who are only concerned with things "as they know them to be".  Like a magician at a child's birthday party, the problem can be solved with "sleight of hand" temporarily if necessary until I can find a way to employ a "REAL" solution.

The Ultimate Solution will probably involve using some proprietary file type that would require using a "viewer" which we would have to provide to the people who are supposed to be able to "view" it.  If anyone here can offer alternatives, I am open to anything but I need to resolve it, at least in some temporary way, as soon as possible. 

I also would be very interested in knowing what change over the last 6 months would have created this issue?

There are several of these sites and every one of them now has the same issue above but as recently as 6 months ago all of them worked fine (as far as I know).  The shift from ending up as an actual downloaded file in the "Viewer's " downloads folder instead of a rather anonymous file in the temporary internet files cache just "happened".   If I knew what caused this change, there could be an quick solution. 

While looking at other sites that host PDF files, One of them I entered shows their files as  "filename.pdf” with a download button next to it.  When I clicked the filename nothing happened but when I clicked the download button, the file opens in a PDF viewer of some kind.    If I do the SAME THING on one of our sites, the file immediately goes to the Chrome Downloads.   I just found this yesterday so I am not sure which app opened when I clicked that “Download” button  but if I could get my sites to do the same thing that would solve a lot of the problem.

On their site, instead of instantly downloading in Chrome (the browser I was using) , it opened in another application which allowed me to read the whole pdf on-screen.  This "shell viewer" does not look like Adobe and more resembles the one built into Edge.  As long as I did not Click the option to SAVE or PRINT (which were icons of a floppy disk, or a printer) when I closed the file after reading there was no "left over" files on my system that I could easily find.

However this happened, it would be perfect for what I need.  Knowing Windows 10, this could even be tied to whatever program is set as the "Default PDF handler" on the Website Server that hosts the Apache Websites.   At the least it demonstrate that there must be a solution even though I do not yet know what it is.

Thanks to everyone for any ideas as this is an urgent situation in the eyes of some and I have to resolve it in way that would have the least impact to the ability to view the files by the people who were meant to view them.

The only way is to make the user culpable in their restrictions, and trust your workaround.  And even then, you'll have problems.

You need to make something that downloads the PDFs to a cache that you control, and renders them itself using that cache.

A good example is shown here:

I uploaded that as a PDF.  Note that you can't download it as such.  It's rendered as an image.  And when you go there, the original PDF is not in your internet cache. (As a note, you can download the original PDF through their interface- but that's allowed use rather than a function of the mechanics for viewing).


[0] Message Index

[#] Next page

Go to full version