Mohamed Ismail
Mohamed Ismail

Reputation: 21

I need to read the epub file in ionic application

I tried to read the epub file using epub.min.js but I didn't get an output. In body tag I wrote the code:

<div onclick="Book.prevPage()">‹</div>
<div id="area"></div>
<div onclick="Book.nextPage()">›</div>
<script src="js/zip.min.js"></script> 
<script src="js/epub.min.js"></script>
<script>
    var Book = ePub('../epub/ANewDay');
    Book.renderTo('area');//div id
    EPUBJS.Render.Iframe.prototype.setLeft = function(leftPos){
    this.document.documentElement.style.WebkitTransform = 'translate("-" + leftPos +"px", 0)';
};
</script>

Upvotes: 0

Views: 623

Answers (1)

Charis The Programmer
Charis The Programmer

Reputation: 959

Are you getting any console errors? Try playing around with this file path:

var Book = ePub('../epub/ANewDay');

if your epub/ directory is a direct child of www/ try "epub/ANewDay" for your file path. Also check file extension.

Upvotes: 1

Related Questions