Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Download PDF file
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Download PDF file

 Post Reply Post Reply Page  <12
Author
Bunce View Drop Down
Senior Member
Senior Member
Avatar

Joined: 10 April 2002
Location: Australia
Status: Offline
Points: 846
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bunce Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 2003 at 6:56pm

Have you even looked at the links I posted. All of them offer valid methods of doing what you want.

The method that Mart suggested is not the page that lists the PDF's to download - this is the page that one of those links point *TO*. It handles the process of streaming the PDF document to the user.

How about actually trying some of these methods and you might learn what is involved.

Then come back to us, post the code that you used and any error messages or problems you encountered. We can't help you otherwise.

 



Edited by Bunce
There have been many, many posts made throughout the world...
This was one of them.
Back to Top
Awangku View Drop Down
Groupie
Groupie


Joined: 15 November 2001
Location: Malaysia
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote Awangku Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 2003 at 7:30pm

I'm trying them now. And I'll also look for others using our friend Google (I definitely have to use better search words).  I'll get back to you when I've found one that works.

Thanks Andrew.

Back to Top
Awangku View Drop Down
Groupie
Groupie


Joined: 15 November 2001
Location: Malaysia
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote Awangku Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 2003 at 11:54pm

Guess what? I've finally found it -- the script for downloading PDF files without any complicated coding. Although I'm not really sure whether it's 100% foolproof. What the heck! It works! All thanks to scooby who posted the script at the infinitemonkeys site.

Here's a copy of the script for you guys out there. Glad to share it with you.

<%@Language="VBScript"%>
<%
Option Explicit

Dim objStream
Dim strFilename

strFilename = Request.QueryString("FName")

Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Type = 1
objStream.Open
objStream.loadFromFile(Server.MapPath(strFilename))

Response.ContentType = "application/unknown"
Response.addHeader "content-disposition", "attachment;filename=" & Chr(34) & strFilename & Chr(34)
Response.BinaryWrite objStream.Read
objStream.Close
Set objStream = Nothing
%>

Andrew.. thanks heaps for your help. Really appreciate it.

 

Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.