Jump to content

How to display PDF file on webpage without download.


virak
 Share

Recommended Posts

You can't display a PDF file in a browser without a browser extension to view PDF files. Browsers do not have implicit support for the PDF format. You also can't stop someone from downloading a file, if you have a file on your server that you are showing to people, they have already downloaded that, there's nothing you can do about it. You can't put something on your server for people to download (that's what web browsing is), but not allow them to save it. You don't have any control over whether they save it or not. If you want to display the contents of a PDF without letting them download the actual PDF file, then you may be able to convert the PDF to HTML format. But they would still be able to save the HTML version, again there's nothing you can do to stop that.http://www.google.com/search?client=opera&...-8&oe=utf-8

Link to comment
Share on other sites

What justsomeguy says is absolutely correct, but here is one alternative: Convert each page to an image and display that instead of the pdf. In order to protect the page contents, place a password on the PDF source. There are softwares which allow you to password pdf's. One I use is called CutePDF[/ur] (or something near that).

Link to comment
Share on other sites

You could put a password on it, but there are also programs that will ignore the password. Speaking of which, if anyone dislikes the Adobe reader the same way I do (slow, heavy, unstable, staying in memory after you close it), check out Foxit reader:http://www.foxitsoftware.com/pdf/rd_intro.phpMuch smaller, starts instantly, doesn't pester with update information. If all you want to do is read a PDF, there's no reason to wait for the Adobe reader to go through initialization and try to load every font and DLL on your entire system just to display a document.

Link to comment
Share on other sites

Right, but that assumes that the reader is going to respect the password. I think the Foxit reader, for one, doesn't even look at passwords when opening a file, and you can also edit it or add notes or whatever. It's up to the reader to follow the rules that the file says it should follow.

Link to comment
Share on other sites

I am not arguing about you points, justsomeguy, simply trying to assist the OP.Many times, though, the client has the softwares on their machine that come with the box and don't know to use the type of software we as web-developers use, so the features we look for are not readily available to them. I'll bet placing a password would be sufficient in over 95% of the cases.

Link to comment
Share on other sites

Yeah, you're right about that. You probably wouldn't want to put a password on opening the file though, I think that even in a browser plugin it would still ask for the password, so you would either need to give the password on the website or not have a password to open it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...