我只是在 1 小时前开始使用 ViewerJS。我尝试使用 PDF、ODS、ODT、ODP、TXT、XML 文件,但它只支持 PDF 和 ODS...所有其他文件格式无法打开。对于 ODT 和 ODP,它在顶部显示加载文件......但内容根本没有出现。
代码示例:
<a href="/ViewerJS/#../Sample.odp">odp</a>
<a href="/ViewerJS/#../Sample_invoice.odt">odt</a>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<a href="/ViewerJS/#../demodoc.pdf">PDF</a>
<a href="/ViewerJS/#../Dev_Windows_Phone_Apps_Getting_Started_Guide.pdf">pdf2</a>
<a href="/ViewerJS/#../sample.ods">ods</a>
<a href="/ViewerJS/#../StockChart.ods">od2</a>
<a href="/ViewerJS/#../Sample.odp">odp</a> <%--loading--%>
<a href="/ViewerJS/#../Sample-Impress-Template_Bern2014_rtryon.odp">odp2</a> <%--loading--%>
<a href="/ViewerJS/#../Sample_invoice.odt">odt</a> <%--loading--%>
<a href="/ViewerJS/#../hotTextInteraction.xml">xml</a> <%--not working--%>
<a href="/ViewerJS/#../qtiplayerCommon.txt">text</a> <%--not working--%>
<br />
<iframe src = "/ViewerJS/#../Sample_invoice.odt" width='400' height='300'></iframe>
</div>
</form>
</body>
</html>
ViewerJS 文件夹包含以下内容。
我需要改变一些东西,还是这是问题?
是否有任何其他库可用于在网页上显示文档?我正在使用 asp.net MVC。