Questions tagged [epub.js]

Epub.js is a JavaScript library for rendering ePub documents in the browser, across many devices.

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.

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

50 questions
0
votes
0 answers

How do I capture the first 3 paragraphs from the second chapter in an epub file?

How do I capture the first 3 paragraphs from the second chapter in an epub file? I am using Nodejs and the following modules epub.js multer fs epub-metadata. My app sends an epub file from the client side to the servers side for parsing. There is a…
SirBT
  • 1,580
  • 5
  • 22
  • 51
0
votes
0 answers

How do I get the EPUB.js book.open() to work?

I am developing a web extension where a user uploads a book in epub format to the client to parse. To test my application, I have tried uploading several epub files but I can't seem to get past the book.open() function that is within my…
SirBT
  • 1,580
  • 5
  • 22
  • 51
0
votes
0 answers

Why aren't my 'epub.js', 'jszip.js' and 'jszip-utils.min.js' files able to load?

I am developing a web extension that is to read and parse an uploaded epub file. Since the Content Security Policy for Chrome extensions restricts external javascript files from being linked to an extension, I have had to download the entire…
SirBT
  • 1,580
  • 5
  • 22
  • 51
0
votes
0 answers

epub.js: cfiFromPercentage does not return the expected result

I am using epub.js and trying to get the cfi from percentage to navigate to a page of the book. I am using the function cfiFromPercentage that epub.js provides us but the result I get is just this: epubcfi(/!/) Can someone help me with a working…
0
votes
1 answer

How to load the last visited page in epub.js

I am building a simple epub reader. I am using epub.js . I want the app to load the last page, what ever page the user was on before he closed the book/reader. Here is my code: const epubBook = "{{ bookpath }}"; var book = ePub(epubBook); var…
0
votes
0 answers

epub.js - show book in 1 simple html file

im trying to create a simple html that will use epub.js to show a book. cause later i want to use it in my react native app. tried to load local file and fil from url . both didnt work epub.js: https://github.com/futurepress/epub.js what am i…
eyal gromzin
  • 155
  • 2
  • 11
0
votes
1 answer

Cannot read property 'requestContent' of undefined. Epubjs

I used Epubjs. But when I run the application. It turns out "Cannot read property 'requestContent' of undefined". Maybe it is about Asynchronous loading.` // @ is an alias to /src import Epub from 'epubjs' global.ePub = Epub export default { …
pukka
  • 1
  • 1
0
votes
1 answer

How to implement text highlighting in epub react reader?

I implemented react reader using this. Then I implemented highlighting text using this example.But I faced the following error: TypeError: contents.mark is not a function Can anyone to help me fix it?
MSD
  • 49
  • 1
  • 6
0
votes
1 answer

How to load ePub from internal storage in ionic4?

I have to load epub from internal storage device in ionic4. I have wasted my time not get any solution. When I load epub from assets, its load properly, but when i am loading epub from ineternal storage device, can't load without error. Plz give me…
Nitin Karale
  • 789
  • 3
  • 12
  • 34
0
votes
0 answers

How to toggle between multiple CSS preserving the changes made with previous CSS?

I am making an epub reader with epub.js, and I intend to give a choice to toggle between various styles. Lets say I want to read the book in dark mode and at a smaller size, so I would first select Dark Mode CSS and then I would select a desired…
0
votes
2 answers

New react-native-app with react-native 0.59.9 or lower

What is the best/easiest way to create new react-native-app using react-native-0.59.9 or lower? Trying to use https://github.com/futurepress/epubjs-rn , which only runs in react-native 0.59 or lower. The example app in…
Lydon Ch
  • 8,637
  • 20
  • 79
  • 132
0
votes
1 answer

How to embed an epub in a github pages website?

I am writing a book in markdown and converting it to pdf and epub using Pandoc. I am wondering if I can embed/view the epub in an HTML page on my GitHub pages website. I came across epub.js, but I am not able to figure out how I can use it on a…
Rohit Farmer
  • 319
  • 4
  • 15
0
votes
2 answers

I can't customize the highlight color in epubjs-rn

I am using epubjs-rn and i wanted to select a color for highlighting a text . I was searching in the docs and i found this code but it didn't work . onSelected={(cfiRange, rendition) => { rendition.highlight(cfiRange, {}, (e) => {console.log(e)},…
Mahdi
  • 1,355
  • 1
  • 12
  • 28
0
votes
1 answer

jQuery: Find all p tags in epubjs structure

I'm trying to find all the p tags generated by drawing an epub using epubjs. Here's the structure that I find, all elements described here have a lot of classes and things I can play around with:
taigi100
  • 2,609
  • 4
  • 23
  • 42
0
votes
2 answers

futurepress/epub.js not working with Amazon s3 urls

I am working on a project where i have to display ebooks on my Laravel web app. I am using futurepress/epub.js to display epub file, epub.js displays files stored in local storage but when i store the files in s3 and use s3 urls it throws…