I just start using ViewerJS before 1 hour. I tried it with PDF, ODS, ODT, ODP, TXT, XML files, But it only supporting PDF and ODS... All other file formats not opening. For ODT and ODP it showing loading file on top... but contents are not coming at all.
Code example :
<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 folder contains following things.
Do I need to change something, or this is issue ?
Is there any other library which I can use to show documents on web page ? I am using asp.net MVC.
The first: What browser did you use? It maybe related to your problem.
The second: ViewerJS supports a lot of extension file include PDF, ODS, ODT, ODP, TXT, XML. Check about how you imported the .js file of ViewerJS into your web page?
The third: Your code show in this post is very quiet good. Don't worry about it! ^^