Skip to content

is it possible to get and locate the specify line number #1617

Answered by wojtekmaj
jiangxiaoqiang asked this question in Q&A
Discussion options

You must be logged in to vote

In general, it's up to the browser to maintain scroll position, but given the delay between the page load and PDF load, this may not work correctly. My advice would be to use IntersectionObserver to track which page is currently displayed on the screen, keep it in sync with URL e.g. by adding #page-2 to it, and upon refresh, reading this hash to programatically move the user back to where they were.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jiangxiaoqiang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants