[置顶] 读取pdf并且在web页面中显示
生活随笔
收集整理的這篇文章主要介紹了
[置顶] 读取pdf并且在web页面中显示
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
讀取pdf并且在web頁(yè)面中顯示
if (System.IO.File.Exists(f)) { Response.ContentType = "applicationpdf"; System.IO.FileStream reader = System.IO.File.OpenRead(f); byte[] data = new byte[reader.Length]; reader.Read(data, 0, (int)reader.Length); reader.Close(); Response.OutputStream.Write(data, 0, data.Length); Response.Flush(); //Response.End(); return; } else { //沒(méi)有找到pdf Response.Write("沒(méi)有找到相應(yīng)文件"); // Response.End(); return; }轉(zhuǎn)載于:https://www.cnblogs.com/wsq724439564/p/3258228.html
總結(jié)
以上是生活随笔為你收集整理的[置顶] 读取pdf并且在web页面中显示的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: numpy的基本使用 附python代码
- 下一篇: office如何快速删除重复数据