You can use my desktop_write module. As you will see, the actual code to do it is pretty simple. This just packages it for you and provides the option of different output file types.
desktop_write
chrishea
Nearly a Posting Virtuoso
1,428 posts since Sep 2008
Reputation Points: 210
Solved Threads: 230
You want to use the following in a new file (download.php)
// We'll be outputting a PDF
header('Content-type: application/pdf');
// It will be called downloaded.pdf
header('Content-Disposition: attachment; filename="downloaded.pdf"');
change the filename parameter to what they called the file in the db and use the correct extension. Also change the content type header
TommyBs
Junior Poster in Training
61 posts since Mar 2008
Reputation Points: 11
Solved Threads: 11