在面板或框架中查看Pdf [英] View Pdf in panel or frame

查看:94
本文介绍了在面板或框架中查看Pdf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我正在使用此代码搜索和查看pdf:



WebClient客户端= new WebClient();

string Path = @Z:\abc\abc\;

Byte [] buffer = client.DownloadData(Path + lblresult.Text);

Response.ContentType =application / pdf;

Response.AddHeader(content-length,buffer.Length.ToString());

Response.BinaryWrite(缓冲区);



现在的问题是,它在浏览器的新窗口中显示pdf我要显示PDF标签,面板等相同的页面



请帮助.....

Hello,

I am using this code to search and view pdf :

WebClient client = new WebClient();
string Path = @"Z:\abc\abc\";
Byte[] buffer = client.DownloadData(Path + lblresult.Text);
Response.ContentType = "application/pdf";
Response.AddHeader("content-length", buffer.Length.ToString());
Response.BinaryWrite(buffer);

now problem is, it is displaying pdf in new window in browser i want to display PDF on same page in lable , Panel etc

Please Help.....

推荐答案

检查链接



将PDF嵌入带有自定义控件的网页 [ ^ ]



http://www.c-sharpcorner.com/UploadFile/scottlysle/EmbedPdfs01202007024952AM/EmbedPdfs.aspx [ ^ ]
Check the link

Embed PDFs into a Web Page with a Custom Control[^]
or
http://www.c-sharpcorner.com/UploadFile/scottlysle/EmbedPdfs01202007024952AM/EmbedPdfs.aspx[^]


这篇关于在面板或框架中查看Pdf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆