

Books are accessible now more than ever, thanks to digitization.Īlthough eReaders continue to offer the finest reading experience, these are not for those bookworms who aren’t keen on shelling out large sums on reading devices. Var exControls = TreineticEpubReader.handler() ĮxControls.In the era of digitization, books have not just endured the fierce competition from visual entertainment mediums but successfully maintained dominance over them, proving wrong the critics who predicted their demise years ago with the arrival of the internet. Library is pure javascript so you can blend and mix with any modern framework, here is a sample code, you can also look at the sample folder inside the dist to find a working demo epub or serve the extracted folder path of the epub TreineticEpubReader is a popular fork of readium-js-viewer it provides a very simple api to interact with epub files, you can load either the epub as. Regarding step 2, I'd start by looking at the various features provided by epub - text, CSS styling, embedded images, etc - and start attacking those one at a time, starting with whatever gives the most return for my time (probably text.). Once you are past this point, you should be able to read in the actual contents, and attempt to translate them into HTML. This is all before we're even touching the actual contents of the epub file. At this point, I'd start looking for existing implementations in javascript, because you probably don't want to be implementing all of this from the ground up. Pretty quickly, you should notice that the format uses OCF to package together multiple files, so your first problem will be to create an OCF reader, which also means that you will need to be able to unzip the data in javascript (Florian Margaine's links should give you an idea of how others have solved this problem). You can break down step 1 by reading up on the epub format itself (e.g.: wikipedia article and general info). Well, that's at a very high level, and doesn't help us much.

Generate HTML which represents the contents (and inline images / SVG / etc).Read in and parse an epub file using javascript.well, that's going to be very difficult to give, since the entire topic is quite large.

From your comments, it seems like you are at a very early conceptual stage, and want general guidance.
