The best way to do paging with BDB JE is to save the key of the first and last items on the current page. When you need to go to the next or previous page, start at the appropriate key and read forward or backward.
But SecondaryDB has same keys if I'm not mistaken. Then how to do it? Can I save the cursor for later use?