我在服务器上有一个文件列表。并希望开发一个页面,其中文档列表将显示为左面板/div中的超链接,同时单击链接。右侧面板显示来自服务器的相应PDF文档。
有人能帮我用jquery或javascript来开发同样的东西吗?
提前感谢
根据我读过的一些文章,我尝试了下面的代码:
身体:
<body style="height: 741px">
<form id="form1" runat="server">
<div id="div1" style="float:left; width: 20%; text-align: left; height: 100%; border-width:2px;">
<button onclick="previewPdf('Documents/Accomodation.pdf','div2')">Accomodation</button>
<br />
<button onclick="previewPdf('Documents/Insurance.pdf','div2')">Insurance</button>
<br />
<button onclick="previewPdf('Documents/Air Ticket.pdf','div2')">Air Ticket.pdf</button>
<br />
</div>
<div id="div2" style="float:right;width: 80%; text-align: left; height: 100%; border-color:Maroon">
</div>
</form>
</body>但它并没有用contentpdf取代“div2”。
发布于 2013-04-30 14:10:41
这里是用于以html5格式显示pdf的javascript。您将需要根据您的要求编辑它。https://github.com/mozilla/pdf.js
发布于 2015-09-22 05:29:26
如果您可以使用ASP.NET PDF查看器组件,那么下面是如何使用Gnostice PDFOne .NET完成的。
PDFViewer1.ActiveLicense("your-license-key");
PDFViewer1.LoadDocument(Server.MapPath(".") + "\\App_Data\\sample.pdf");

免责声明:我为Gnostice工作。
https://stackoverflow.com/questions/16298396
复制相似问题