简体   繁体   English

Android epub阅读器开发临近

[英]Android epub reader development approaching

I am writing a proposal for epub reader project which have ability to display vertical text for Japanese language. 我正在为epub阅读器项目编写一个提案,该提案能够显示日语的垂直文本。 Firstly, I want to know the main flow of a book reader to load and read epub then define the key point / main technology need to focus on the proposal. 首先,我想知道图书阅读器加载和阅读epub的主要流程,然后定义要点/主要技术需求,以提案为重点。

The requirement of book reader here is to have basic features: read book, display current/total pages, go to any position of the book. 此处阅读器的要求是具有基本功能:阅读书籍,显示当前/总页数,转到书籍的任何位置。

As I understand the main flow as bellow: 据我了解,主要流程如下:

  1. The BReader extract the epub to xhtml files BReader将epub提取为xhtml文件
  2. The BReader load all the xhtml files to webview BReader将所有xhtml文件加载到Webview
  3. The BR add the js to rotate text to vertical. 无线电通信局添加js将文本旋转为垂直。 The js can be nehan js可以是nehan
  4. The BR add the js to separate the pages base on the device screen specification BR根据设备屏幕规范添加js来分隔页面
  5. Render the current page 呈现当前页面

However, in step (2), if it load all the xhtml files, the performance will be very poor for large epub. 但是,在步骤(2)中,如果它加载了所有xhtml文件,则对于大型epub而言,性能将非常差。 I studied some Epub Reader like as "E-bookreader of SONY" and "NeoSoar" and see that the time of open a epub is the same (around 5 seconds) for every epub files so I believe that they only load a part of the book at the first time. 我研究了一些诸如“ SONY的电子书阅读器”和“ NeoSoar”之类的Epub Reader,发现每个epub文件的打开epub的时间都是相同的(大约5秒),因此我相信它们只会加载一部分第一次预订。

How can they do that? 他们该怎么做? and if they only load a part of the epub how do they calculate the total pages? 如果他们只加载一部分epub,如何计算页面总数? and how they can go to any page number of the book? 以及他们如何转到书的任何页码?

You Probably need to refer this . 您可能需要参考此内容

Download epublib-core-latest.jar from github Download slf4j-android Add both to your android project github下载epublib-core-latest.jar下载slf4j-android将它们都添加到您的android项目中

and follow the sample. 并按照示例进行操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM