javascript - How to load .PDF file directly as initialDoc without using XOD in PDFtron -


below mentioned sample code using in our application,if loading .xod file through initialdoc: "gettingstarted.xod" working file.if change .xod .pdf(like initialdoc: "gettingstarted.pdf") not working how resolve this.

<head>      <meta content="text/html" http-equiv="content-type">      <script src="js/html5/external/jquery-1.7.2.min.js" type=     "text/javascript">      </script>      <script src="js/webviewer.min.js" type="text/javascript">      </script>      <script type="text/javascript">      $(function() {     var viewerelement = document.getelementbyid('viewer');     var mywebviewer = new pdftron.webviewer({     type: "html5mobile",     path: "js/",     documenttype: "pdf",     initialdoc: "gettingstarted.pdf",     //documentid: "gettingstarted",     enableannotations: true     //streaming: false     }, viewerelement);     });     </script>     <title>     </title> </head>  <body style= "width:100%;height:100%;margin:0px;padding:0px;overflow:hidden">      <div id="viewer" style="height: 100%; overflow: hidden;">      </div>  </body>  </html> 

for pdf file viewing: .pexe, .nmf, .res , .mem file extensions might need added server's allowed mime types list. please consult server's manual on how add following entry mime types list.

the following mime types should added:

extension: .res, mime type: application/octet-stream
extension: .pexe, mime type: application/x-pnacl
extension: .nmf, mime type: application/octet-stream
extension: .mem, mime type: application/octet-stream


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -