How to use the epubjs function in epubjs

To help you get started, we’ve selected a few epubjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sam9831 / free-ebook-demo / src / Ebook.vue View on Github external
showEpub() {
      // 生成Book对象
      this.book = new Epub(DOWNLOAD_URL)
      // 通过Book.renderTo生成Rendition对象
      this.rendition = this.book.renderTo('read', {
        width: window.innerWidth,
        height: window.innerHeight,
        // 兼容iOS
        method: 'default'
      })
      // 通过Rendtion.display渲染电子书
      this.rendition.display()
      // 获取Theme对象
      this.themes = this.rendition.themes
      // 设置默认字体
      this.setFontSize(this.defaultFontSize)
      // 注册主题
      this.registerTheme()
      // 设置默认主题
github futurepress / epubjs-rn / src / Epub.js View on Github external
_loadBook(bookUrl) {
    __DEV__ && console.log("loading book: ", bookUrl);

    this.book = ePub({
      replacements: this.props.base64 || "none"
    });

    return this._openBook(bookUrl);

    /*
    var type = this.book.determineType(bookUrl);

    var uri = new Uri(bookUrl);
    if ((type === "directory") || (type === "opf")) {
      return this._openBook(bookUrl);
    } else {
      return this.streamer.start()
      .then((localOrigin) => {
        this.setState({localOrigin})
        return this.streamer.get(bookUrl);
github InfiniteLibrary / infinite-electron / app / components / Epub / index.js View on Github external
constructor(props) {
    super(props);
    this.book = ePub();
    this._visibleLocation = 0;
  }

epubjs

Parse and Render Epubs

BSD-2-Clause
Latest version published 2 years ago

Package Health Score

59 / 100
Full package analysis

Similar packages