Monday, 15 March 2010

android - Epub Reader example Issue -



android - Epub Reader example Issue -

i seek read epub file content convert book formats using phonegap technology.i found examples using phonegap shown below link:

http://bytedebugger.wordpress.com/2014/05/21/cordovaphonegap-ebook-reader-for-web-and-mobile-with-epub-js-plugin/

in examples tries implements basic epub example.i tries code shown below :

<!doctype html> <html class="no-js"> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge,chrome=1"> <title>basic epubjs example</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width"> <meta name="apple-mobile-web-app-capable" content="yes"> <!-- epubjs renderer --> <script src="../build/epub.min.js"></script> <!-- zip js --> <script src="../build/libs/zip.min.js"></script> <!-- inflate js --> <script src="../build/libs/inflate.js"></script> <script> epubjs.filepath = "../build/libs/"; </script> <script> var book = epub("content.epub");//here epub file path given </script> </head> <body> <div id="main"> <div id="prev" onclick="book.prevpage();" class="arrow">‹</div> <div id="area"></div> <div id="next" onclick="book.nextpage();"class="arrow">›</div> </div> <script> book.renderto("area"); </script> </body> </html>

error : the operation insecure. undefined

the above illustration not gets output shows empty.i didn't thought this.so can please suggest me this?

thanks in advance.

first, reading documentation: https://github.com/futurepress/epub.js/blob/master/readme.md see of import part:

if plan on using compressed (zipped) epubs (any .epub file) include minified version of zip.js

also create sure set epubjs.filepath directory containing inflate.js

<script src="/build/libs/zip.min.js"></script> <script> epubjs.filepath = "../build/libs/"; </script>

so, first thing need add together theses libs.

some browsers can block access of file, if have problems, maybe need utilize web server.

android cordova epub

No comments:

Post a Comment