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.