js-epub-maker demo

Download EPUB

All the custom content has been defined in template <script> tags.

The content is minified using HTML Minifier to demonstrate that the resulting EPUB can be produced with nicely formatted contents (technically that is, readers don't see a difference)


3rd Party libraries explained

library optional what is it used for
js-epub-maker.js required Core library that uses all other libraries to produce a custom EPUB file
handlebars.min.js required Used to blend in the provided content sources into the EPUB resources
jszip.min.js required used to create the physical EPUB file, which is actually a zip file with a modified mimetype
jszip-utils.min.js required for custom cover image This util is used to GET image data properly as base64
FileSaver.min.js required for download EPUB function Allows the browser to download an in memory datasource as file using 'Save as...' dialog
underscore.string.min.js optional If supplied, will use the more advanced slugify function from underscore.string.
beautify-html.js optional If supplied, formats all HTML and XML files in the produced EPUB. Only useful for close inspection purposes, EPUB readers won't know the difference.