PDA

View Full Version : Inserting Word documents, pdf files


niknik
10-13-2007, 07:50 AM
Please guide... I need to put complete pdf file and word documents to be available for download on a web page. These files need not open in web browser but the user should be able to download them, like we download and save images. kindly advice how to go about it. M using dreamweaver MX

thanks a lot,
Niknik

davidj
10-13-2007, 08:11 AM
just point to the document like you would a web page

domedia
10-13-2007, 01:02 PM
just point to the document like you would a web page
Depending on your preferences, that very well might open the document in the browser.

niknik, the quick and dirty solution is to give instructions to right-click and save-as.

Jittor
10-15-2007, 07:55 PM
if it is in a ZIP file it will prompt them to download, but Dom is probably right, then again even that might be to much for people depending on your target audience?

Ricky55
10-16-2007, 03:08 PM
You'd be best putting all PDF's and then they can open in the browser or be saved as from more experienced users.

You could use http://www.zamzar.com/ to convert you word .docs to .pdf

Ricky55

davidj
10-16-2007, 03:28 PM
in PHP you can set it to point to the file like this...

header('Content-disposition: attachment; filename=file.doc');
header('Content-type: application/msword doc');
readfile('file.doc');

so you would just pass in the path of the doc and the name and let php send you the file.

This should prompt for a download.

the only downside is you need a PHP environment

domedia
10-16-2007, 03:35 PM
Did you test this DJ? It looks like if the browser has it's default set to open Word embedded *inside* the browser, this would still happen.

davidj
10-16-2007, 03:45 PM
Mmm this has always prompted me to save before download