Get page number for a piece of text

82 views
Skip to first unread message

kronos

unread,
Mar 4, 2012, 1:11:15 AM3/4/12
to epublib
Like previous posts, I am interested only in extracting the text.
I've achieved that by using the Spine. But, most books have less
Resources than pages, and there is no clear way to map the resource's
text to a page number.

Is there a way to get this piece of information without rendering the
eBook ?

Thanks.

kronos

unread,
Mar 4, 2012, 1:11:30 AM3/4/12
to epublib

Heinrik Honculada

unread,
Mar 5, 2012, 11:13:40 AM3/5/12
to epu...@googlegroups.com
To be honest I don't have this feature using the library.

Paul Siegmann

unread,
Mar 5, 2012, 11:36:52 AM3/5/12
to epublib
Hi Jeremy,

Unfortunately it is very complicated to tell which page a piece of
text comes from in an epub.
The problem is that the page size changes per device and also per
orientation.
A piece of text can for instance be on page 8 when I hold my phone
vertically, but it moves to page 7 when I hold it horizontally.
This because the viewer can put more text on the screen when I hold it
horizontally.

A possible solution is to not refer to a page but to a resource and a
position within that resource.
Example: chapter6.html, 17th character from the start.

regards,
paul

Christian Brugeron (gmail)

unread,
Mar 5, 2012, 12:34:02 PM3/5/12
to epu...@googlegroups.com
In some epubs, there is a pagelist resource, close to the spine. It may help

cb

Reply all
Reply to author
Forward
0 new messages