我有一本pdf书我想在asp.net浏览器的pdf查看器中打开这个pdf “http://wdn.ipublishcentral.net/informatics/viewinside/40590590200230” 你会推荐我吗?
最佳答案
<iframe>
标签用于此。
尝试像下面这样使用这个标签:
<iframe src="anyfilename.PDF" width="810px" height="700px" scrolling="no" frameborder="0">
</iframe>
如果您像您提供的链接一样使用 telerik 控件,请使用以下内容>>
<radPdf:PdfWebControl id="PdfWebControl1" runat="server" height="600px" width="100%" />
和代码隐藏>>
if (!IsPostBack)
{
//Get PDF as byte array from file (or database, browser upload, remote storage, etc)
byte[] pdfData = System.IO.File.ReadAllBytes(@"C:\demo.pdf");
//Load PDF byte array into RAD PDF
this.PdfWebControl1.CreateDocument("Document Name", pdfData);
}
希望对您有所帮助!!!
关于c# - 如何在 asp.net 中打开 pdf 到 pdf 查看器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15634492/