This project is deprecated.
A much better alternative now exists: https://github.com/futurepress/epub.js/
The old code is here: https://github.com/augustl/js-epub/tree/e13c447b331b091812a115ae54b446de5463e34a
EPUB library for Javascript
Home Page: http://ditrw.com/booktorious/
This project is deprecated.
A much better alternative now exists: https://github.com/futurepress/epub.js/
The old code is here: https://github.com/augustl/js-epub/tree/e13c447b331b091812a115ae54b446de5463e34a
Probably on the Zip/inflate level.
I am doing epub reader in DOJO. How to read epub in dojo with js??
postProcess: function () {
for (var key in this.opf.manifest) {
var mediaType = this.opf.manifest[key]["media-type"]
var href = this.opf.manifest[key]["href"]
var result = undefined; // "result" is hoisted, so it must be initialize to undefined explicitly
if (mediaType === "text/css") {
result = this.postProcessCSS(href);
} else if (mediaType === "application/xhtml+xml") {
result = this.postProcessHTML(href);
}
if (result !== undefined) {
this.files[href] = result;
}
}
}
Hey there,
it seems like a very nice library. However, whenever I try to read a file from a servlet written in Java, I get the following error (Safari 5.1.2/Chrome 16.0.912.77):
TypeError: 'undefined' is not an object (evaluating 'c.getElementsByTagName("rootfile")[0].getAttribute')
I have tried with Base64 encoding, without, but it still gives me the same error. What do you think could be the problem?
Thanks!
hai,
I want to integrate js-epub.js with the https://github.com/joseph/Monocle.pls help me ..
The parser manually scans for img tags now, with a regexp.
Rewrite it to use DOMParser
. Look for <a>
and <link>
as well as <img>
.
hai,
i am using the following code but it does not goes beyond step3.pls help me by providing some suggestions.
$(document).ready(function(){
$.ajax({
url: "alice.epub",
complete: function(response, status, request) {
var the_zip = new JSUnzip(response.responseText);
$('#something').html('finished with ' + status);
console.log("is it zip?" + the_zip.isZipFile());
var epub = new JSEpub(response.responseText);
alert(epub);
epub.processInSteps(function (step, extras) {
var msg = '';
console.log(step);
if (step === 1) {
msg = "Unzipping";
} else if (step === 2) {
msg = "Uncompressing " + extras;
}
else if (step === 3) {
msg = "Reading OPS";
}
else if (step === 4) {
msg = "Post processing";
alert(msg);
}
else if (step === 5) {
msg = "Finishing";
alert('done!');
}
else {
msg = "Error!";
}
$('#something').html(msg);
});
}
});
});
Hello, the script seems good when reading the source code, but the documentation isn't clear and I can't test it locally. I tried downloading an epub file with XHR as is suggested in Usage, but I can't make it work. It would be wonderful if you could provide an example HTML file to test the script and also use it as a starting point, or at least point to a webpage using js-epub in order to see how it is done.
Thanks in advance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.