[置顶] 读取pdf并且在web页面中显示
生活随笔
收集整理的這篇文章主要介紹了
[置顶] 读取pdf并且在web页面中显示
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
讀取pdf并且在web頁面中顯示
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 { //沒有找到pdf Response.Write("沒有找到相應文件"); // Response.End(); return; }轉載于:https://www.cnblogs.com/wsq724439564/p/3258228.html
總結
以上是生活随笔為你收集整理的[置顶] 读取pdf并且在web页面中显示的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: numpy的基本使用 附python代码
- 下一篇: office如何快速删除重复数据