hide path to .pdf files

J

James

i am using adostream to push my pdf files to my customers but it pops up a
save/open dialog box.how can i make it so that it just opens the pdf as if
they where browsing to the direct path of an pdf file. p.s. i use this code
to hide the direct path so that the users can't try gessing other pdf file
names since they are in numerical order.

Response.contenttype = "application/pdf"
FPath = "d:\pdfs\" & pFileName
Response.AddHeader "content-disposition","attachment; filename=" &
pFileName
Set adoStream = CreateObject("ADODB.Stream")
adoStream.Open()
adoStream.Type = 1
adoStream.LoadFromFile(FPath)
Response.BinaryWrite adoStream.Read()
adoStream.Close
Set adoStream = Nothing
Response.End
 
M

Mark Schupp

Leave out the content-disposition header. Then if their Acrobat player is
set to automatically display pdfs it should come right up.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top