如何在具有经典ASP的浏览器中打开pdf文件

问题描述:

<!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>





我在浏览器中查看pdf文件的代码。虽然发生了错误.Plz帮助我



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