如何在具有经典ASP的浏览器中打开pdf文件 [英] how to open pdf file in a browser with classic ASP
本文介绍了如何在具有经典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
推荐答案
这篇关于如何在具有经典ASP的浏览器中打开pdf文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文