fix: check number of pages before calling hintPage

otherwise, we will reach out page limit when reached last page
Merge pull request #720 from houqp/new_ui_fix

fix: check number of pages before calling hintPage
Merge branch 'new_ui_code' of github.com:hwhw/kindlepdfviewer into new_ui_houqp