Results 1 to 2 of 2
Oct 9, 2006, 10:42 #1
- Join Date
- Oct 2006
- 0 Post(s)
- 0 Thread(s)
Help with reading pdf (ADODB.stream): Please help
I am trying to secure .pdf files by having users login and based on UserID, allow access to certaing .pdf's.
I have tried it a few different ways using different file types and their corresponding contenttype and nothing happens. I even used the same example from microsoft.com and I get "page cannot be displayed" . Please help:
BTW, i am using .asp (not asp.net)
here is my code
Response.ContentType = "application/pdf"
Const adTypeBinary = 1
strFilePath = "test.pdf" 'This is the path to the file on disk.
Set objStream = Server.CreateObject("ADODB.stream")
objStream.Type = adTypeBinary
Set objStream = Nothing
Oct 10, 2006, 01:09 #2
I tried your code and it works for me, provided the file path points to a valid file. Maybe you have a permissions problem?