• Post Reply Bookmark Topic Watch Topic
  • New Topic

Paginating through text.

 
Andrew Babaian
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know there's plenty of examples and discusions of pagination through record sets out there, but I'm looking for some help on paginating through text. I have magazine text articles anywhere from 500 - 5000 words that the client would like to paginate across multiple jsp pages.

I've searched on pagination, but haven't seen anything that relates to my needs. Can anyone send me in the right direction for something like this?

Thanks

Andrew
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35709
408
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Andrew,
You need to decide where a logical breaking point is. Do you want to break on paragraphs? sentences? words? ...

Then keep adding to a data structure until a page is almost full. This will probably be based on the number of characters. When you can't add the next word/sentence/paragraph/ to the page, it is time for a page break.

If this is an online article, you have more slack and can break on paragraphs. If it is a printed article, you would want to fill up the page and use a words or sentences.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!