Total page count

48 views
Skip to first unread message

Mark Kessler

unread,
Nov 22, 2012, 10:55:51 AM11/22/12
to trees...@googlegroups.com
I wonder if there is any way to calculate the total number of all pages through all documents in a publication? I would need that to create a scrollbar based navigation concept.
Regards,
Mark

Andrea Campi

unread,
Nov 22, 2012, 11:06:06 AM11/22/12
to trees...@googlegroups.com
On Thu, Nov 22, 2012 at 4:55 PM, Mark Kessler <kessle...@gmail.com> wrote:
I wonder if there is any way to calculate the total number of all pages through all documents in a publication? I would need that to create a scrollbar based navigation concept.

Not trivial, you have to paginate all the way to the end to calculate them.
And just then, the user will resize the browser window, which will change the number of lines per page, hence of pages per article, hence you'll have to compute it again.

Not really fun :)

Mark Kessler

unread,
Nov 22, 2012, 11:10:51 AM11/22/12
to trees...@googlegroups.com
Probably not very performant.. 

Mark Kessler

unread,
Nov 22, 2012, 11:12:30 AM11/22/12
to trees...@googlegroups.com
But if I do it like this, is there a javascript call to jump to a specific page in a specific document?

Andrea Campi

unread,
Nov 22, 2012, 11:20:28 AM11/22/12
to trees...@googlegroups.com
On Thu, Nov 22, 2012 at 5:12 PM, Mark Kessler <kessle...@gmail.com> wrote:
But if I do it like this, is there a javascript call to jump to a specific page in a specific document?

Yeah, that's the flip side of that, isn't it?
No there isn't. It's very high of my list of priorities, but we aren't there yet.

When we do get around to implement it, I think it will work in a slightly different way.
We will actually jump to the page that contains the beginning of a specific paragraph.

I'm a big proponent of an approach similar to Emphasis:

Mark Kessler

unread,
Nov 22, 2012, 11:42:36 AM11/22/12
to trees...@googlegroups.com
That would definitely be a useful feature. However, if one would target a specific page, what would be the approach here? Thinking of trying to implement it myself..  Maybe not so difficult after all? Actually just a more generalized ArticleManager.nextPage or am I missing something here?

Andrea Campi

unread,
Nov 22, 2012, 11:53:19 AM11/22/12
to trees...@googlegroups.com



On Thu, Nov 22, 2012 at 5:42 PM, Mark Kessler <kessle...@gmail.com> wrote:
That would definitely be a useful feature. However, if one would target a specific page, what would be the approach here? Thinking of trying to implement it myself..  Maybe not so difficult after all? Actually just a more generalized ArticleManager.nextPage or am I missing something here?

Sure, if based on the current screen size you just want to jump forward n pages, in a nutshell you can just do the equivalent of ArticleManager.nextPage.
That should work, you could give it a try.

I guess I'm not seeing the use case though…
I mean, it won't help a user go back to where she left off; it won't let her refer a friend to a point in the article; and it won't be useful as a reference for e.g. scientific work.
But those are *my* use cases, I'm sure you have others in mind that are just as valid :)

Mark Kessler

unread,
Nov 22, 2012, 12:01:54 PM11/22/12
to trees...@googlegroups.com
You are right.. Targeting a specific page would only make sense when the screen size does not change which can only be assumed in very restricted settings (e.g. on a tablet device with locked orientation). Targeting a specific paragraph would make much more sense. This is definitely a feature I would need though I fear it will be very hard to implement..

Nathan Do

unread,
Nov 23, 2012, 3:54:02 AM11/23/12
to trees...@googlegroups.com
Link targeted a specific paragraph is also what I am looking for right now. This would definitely be a great feature. Meanwhile, maybe we can use target the specific page as a temp solution. 
Reply all
Reply to author
Forward
0 new messages