epub.js | Enhanced eBooks in the browser | Media library

 by   futurepress JavaScript Version: v0.3.88 License: Non-SPDX

kandi X-RAY | epub.js Summary

kandi X-RAY | epub.js Summary

epub.js is a JavaScript library typically used in Media applications. epub.js has no bugs and it has medium support. However epub.js has 1 vulnerabilities and it has a Non-SPDX License. You can install using 'npm i zhl-epubjs' or download it from GitHub, npm.

Epub.js is a JavaScript library for rendering ePub documents in the browser, across many devices. Epub.js provides an interface for common ebook functions (such as rendering, persistence and pagination) without the need to develop a dedicated application or plugin. Importantly, it has an incredibly permissive Free BSD license.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              epub.js has a medium active ecosystem.
              It has 5682 star(s) with 1040 fork(s). There are 203 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 437 open issues and 558 have been closed. On average issues are closed in 161 days. There are 24 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of epub.js is v0.3.88

            kandi-Quality Quality

              epub.js has 0 bugs and 0 code smells.

            kandi-Security Security

              epub.js has 1 vulnerability issues reported (0 critical, 0 high, 1 medium, 0 low).
              epub.js code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              epub.js has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              epub.js releases are available to install and integrate.
              Deployable package is available in npm.
              Installation instructions, examples and code snippets are available.
              epub.js saves you 1980 person hours of effort in developing the same functionality from scratch.
              It has 4357 lines of code, 0 functions and 133 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed epub.js and discovered the below as its top functions. This is intended to give you an instant insight into epub.js implemented functionality, and help decide if they suit your requirements.
            • Start the experiment
            • Make XML request
            • Handle the response
            • Replaces links with links .
            • Define a new promise
            • Index of an item in the sorted array .
            • Returns the location of an item in an array .
            • Creates a folder element .
            • replace the page s base url
            • queries an HTML element
            Get all kandi verified functions for this library.

            epub.js Key Features

            No Key Features are available at this moment for epub.js.

            epub.js Examples and Code Snippets

            No Code Snippets are available at this moment for epub.js.

            Community Discussions

            QUESTION

            Could not make epub reader show up with Epub.js from futurepress
            Asked 2020-Aug-10 at 11:21

            I am building a web app where I try to display a epub reader in the page using Epub.js from futurepress. However, I could not get the reader show up even with the example book link. Could anyone tell me where I did wrong?

            HTML:

            ...

            ANSWER

            Answered 2020-Aug-10 at 11:21

            You need to add an additional option to ePub function

            Source https://stackoverflow.com/questions/63224172

            QUESTION

            epub.js set font size
            Asked 2020-Feb-29 at 15:56

            I'm using epub.js to render .epub books, but I cant set fonSize in some ebooks, it wont override existing classes with the font-size already set on the ebook;

            I read the documentation and the issues.

            Here is the source

            ...

            ANSWER

            Answered 2020-Feb-29 at 15:56

            QUESTION

            How do I display in HTML the cover of an epub book using epub.js?
            Asked 2020-Jan-14 at 01:13

            I'm using EPUB.js and Vue to render an Epub. I want to display the cover images of several epub books so users can click one to then see the whole book.

            There's no documentation on how to do this, but there are several methods that indicate that this should be possible.

            First off, there's Book.coverUrl() method.

            Note that I'm setting an img src property equal to bookCoverSrc in the Vue template. Setting this.bookCoverSrc will automatically update the src of the img tag and cause an image to display (if the src is valid / resolves).

            ...

            ANSWER

            Answered 2020-Jan-14 at 01:13

            The reason this was happening to me was because the functioning line of code in the coverUrl function was commented out in the source library epub.js, and a non-functioning line of code was written instead.

            So, I had to copy down the entire library, uncomment the good code and delete the bad. Now the function works as it should.

            To do so, clone down the entire epub.js project. Copy over the dependencies in that project's package.json to your own. Then, take the src, lib, and libs folders and copy them somewhere into your project. Find a way to disable eslint for the location you put these folders into because the project uses TAB characters for spacing which caused my terminal to hang due to ESLINT exploding.

            npm install so you have your and epub.js dependencies in your node_modules.

            Open book.js. Uncomment line 661 which looks like

            Source https://stackoverflow.com/questions/59725723

            QUESTION

            How to bind events to the rendition in epub.js
            Asked 2018-Nov-18 at 10:16

            I want to register a right click listener on the page in epub.js but don't know how to do it. There is also passEvents method of rendition object but couldn't find any help on that either. This is my last try:

            ...

            ANSWER

            Answered 2018-Nov-18 at 10:09

            Based on what you asked and I hope I got it right, you want a contextmenu event at the book itself, right?

            If that's the case I used the following JS:

            Source https://stackoverflow.com/questions/53358934

            QUESTION

            Display dynamic html content like an epub/ebook, without converting html to epub format?
            Asked 2018-Sep-06 at 02:32

            I want to create a responsive, mobile optimized reading experience similar to an epub/ebook reader, like the Kindle app, or iBooks, using dynamic html as the source.

            Imagine a long article or blog post that requires a lot of vertical scrolling to read, especially on a small mobile device. What I would like to do is break the long page into multiple full-screen sections, allowing the user to use left/right navigation arrows and/or the swipe gesture to "page" through the article.

            There are many JS libraries available that can create a "slide show" or "carrousel" of pre-defined slides (using divs or other container elements). But I want the text and html content to dynamically re-flow to fit any device viewport and still be readable... just like an epub/ebook user interface, like the Kindle app or iBooks. So, for the same article, there would be many more "pages" on a phone than there would be on a tablet or desktop viewport, and those "pages" would need to be dynamically created/adjusted if/when the viewport size changes (like switching from portrait to landscape on a mobile device).

            Here is an example of a javascript .epub reader: epub.js

            ... notice the responsive behavior. When you resize your viewport, all the text re-flows to fit the available space, increasing or decreasing the total number of "pages". The problem is that epub.js requires an .epub file as its source.

            What I want is the same user interface and functionality for an html page.

            I have searched and searched for some kind of library that can do this out of the box, but haven't been able to find anything.

            I realize that I could use a conversion script to convert my html page into an .epub file, and then use epub.js to render that file within the browser, but that seems very round-about and clunky. It would be so much better to mimic or simulate the .epub reader user experience with html as the direct source, rendering/mimicking a client side responsive ebook user experience.

            Does anyone know if something like this already exists, or how I could go about building it myself?

            The crucial functionality is the dynamic/responsive text-reflow. When the viewport dimensions are reduced, the text/content needs to reflow to the next "page" to avoid any need for vertical scrolling. I don't know how to do this efficiently. If I were to code it myself, I might use something like the jQuery Columnize plugin, setting all columns to width: 100vw; height: 100vh, so that each column is like a "page", and then figuring out how to create a swipe UI between those "pages".

            Any help is much appreciated!

            ...

            ANSWER

            Answered 2018-Sep-05 at 19:12

            Take a look at this repository on GitHub. Otherwise, you can create a one-page website with many sections, each one as high as the viewport, by using only CSS (demo):

            Source https://stackoverflow.com/questions/49330858

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install epub.js

            Get the minified code from the build folder:.

            Support

            API documentation is available at epubjs.org/documentation/0.3/. A Markdown version is included in the repo at documentation/API.md.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/futurepress/epub.js.git

          • CLI

            gh repo clone futurepress/epub.js

          • sshUrl

            git@github.com:futurepress/epub.js.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link