Click here to Skip to main content
15,901,122 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body>
<%
Dim strPDF
strPDF= \"D:\\ODBC.pdf\"
Set oFileStream = Server.CreateObject(\"ADODB.Stream\")

oFileStream.Open
oFileStream.Type = 1 'Binary
oFileStream.LoadFromFile strPDF

Response.ContentType = \"application/pdf\"
Response.AddHeader(\"Content-Disposition\", \"inline; filename=\" + strPDF)
Response.BinaryWrite(oFileStream.Read)

oFileStream.Close
Set oFileStream= Nothing


%>

</body>
</html>


I code to view pdf file in a browser. Although error had been happened. Plz Help Me
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900