How does the Javascript-epub ebook reader get the total number of pages and the current number of pages?

Source: Internet
Author: User
Keywords Php epub javascript
Units need to implement a Web-based epub reader, the functionality has been initially implemented, but the total number of pages and the current number of pages is more difficult to calculate. Because EPUB is equivalent to a collection of HTML documents, including text, pictures, tables, lists and other forms of expression, while the client side, the mobile phone and the Computer browser has a variety of different resolutions, users will choose their own favorite font size, so open in different clients, the number of pages is not the same, each recalculation, Execution is inefficient and difficult to calculate accurately.
Is there any good way to implement?

Reply content:

Units need to implement a Web-based epub reader, the functionality has been initially implemented, but the total number of pages and the current number of pages is more difficult to calculate. Because EPUB is equivalent to a collection of HTML documents, including text, pictures, tables, lists and other forms of expression, while the client side, the mobile phone and the Computer browser has a variety of different resolutions, users will choose their own favorite font size, so open in different clients, the number of pages is not the same, each recalculation, Execution is inefficient and difficult to calculate accurately.
Is there any good way to implement?

This kind of thing has no solution, it is best to change ideas. Knowing the current page and the total number of pages is all about reading progress, so showing a percentage of the bar is a good alternative.

Record the progress, percentage, and display of the reading directly.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.