Forum Moderators: open

Message Too Old, No Replies

pdf file download option

         

jbhavin

1:04 pm on Sep 3, 2003 (gmt 0)

10+ Year Member



hi,

I have to make pdf files for download by the user.

SO how do i do this, and how get the download dialog box.

Secondly, how i store the pdf files on the server database, i suppose jus the path of the file will be stored am i right?

if so how to do that, any help friends?

mcavill

1:14 pm on Sep 3, 2003 (gmt 0)

10+ Year Member



if a browser has the plugins to handle .pdf file type it will display it in the browser window - if it doesn't know what to do with the file it'll prompt the user to download.

If you want them to download it you could put it in a zip file that way the browser will prompt to the user to save the file when they click the link.

As far as the URL goes and your database - just treat it like any other link to an internal page.

jbhavin

1:24 pm on Sep 3, 2003 (gmt 0)

10+ Year Member



Basically i mean that, i have pdf documents , which i have to prompt the user to download from the site, if they want.

now once they click the link a window dialog box should open asking them to save, where to save etc..., which is in many websites!

how i do?

txbakers

1:41 pm on Sep 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



All you need to is make a hyperlink to the pdf file just like any other file on the webserver.

It will either open in the browser and the user can save it, or they will prompted to download it.

jbhavin

1:55 pm on Sep 3, 2003 (gmt 0)

10+ Year Member



exactly how do i get the user to download the file, that control box of windows how do i do, asking to open frm current location or download and then the box about which location, they want to store.

Jenstar

2:39 pm on Sep 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just insert a link like you would a normal hyperlink:

<a href="http://www.yourdomain.com/file.pdf">Your pdf file name</a>

This will either launch it in the browser for those with the plugin, or prompt the user to save the file, for those without the plugin.

g1smd

7:56 pm on Sep 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



<a href="http://www.yourdomain.com/file.pdf" title="Right click the link and select the save option">Right click this link and select the save option</a>

Jenstar

8:14 pm on Sep 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



LOL - that is exactly what I have. Trust me, I get many, many support requests because people do the left click and "Freeze" their computers because it is such a large pdf file they are opening in their older/slower computers. Many people cannot understand the concept of right click. Among the replies I received - "well of course, I did a right click. Who uses their left hand with their mouse?"

I should probably throw an image on there, showing which button you click for a right click, and which button you click for a left click. ;)

g1smd

8:41 pm on Sep 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



.... except that any reference to left and right gets messed up for those users who have reversed their mouse button actions in the operating system preferences.

Can we be sure that all people doing that are competant computer users? If so, then no problem with your idea.

Jenstar

9:00 pm on Sep 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am sure anyone competent enough to change those preferences would also be smart enough to figure out a left click vs. right click.

I get a lot of visitors that are of the "this is my first online purchase" or "i just got online with AOL last week" or "I don't know anything about how to download but my son is going to walk me through my purchase over the phone" variety.

I wish there was a way to automatically popup the save box, rather than that darn plugin launching it in the browser. But unfortunately, there is no easy way.

Ryan8720

9:08 pm on Sep 3, 2003 (gmt 0)

10+ Year Member



By default, browsers won't ask the user to download the PDF file via Save As.... You can change that by adding the following line to your .htaccess file:

AddType application/octet-stream pdf