Help please. I'm trying to read PDF within browser but I get text garbage.
Code:
<%
Response.Buffer = true
dim objStream
set objStream = server.CreateObject("ADODB.Stream"
objStream.Type = 1 'adtypeBinary
objStream.Open
objStream.LoadFromFile(Server.Mappath("test.pdf")
Response.Clear
Response.ContentType="application/pdf"
Response.AddHeader "content-disposition", "attachment;filename=.pdf"
Response.BinaryWrite objStream.Read
ObjStream.Close : set objStream=nothing
Response.End
%>
Thanks,
Ricky Thanks,
Ricky
Code:
<%
Response.Buffer = true
dim objStream
set objStream = server.CreateObject("ADODB.Stream"
objStream.Type = 1 'adtypeBinary
objStream.Open
objStream.LoadFromFile(Server.Mappath("test.pdf")
Response.Clear
Response.ContentType="application/pdf"
Response.AddHeader "content-disposition", "attachment;filename=.pdf"
Response.BinaryWrite objStream.Read
ObjStream.Close : set objStream=nothing
Response.End
%>
Thanks,
Ricky Thanks,
Ricky