Reputation: 21
I using pdf.js for displaying pdf in browser.I noticed if i scroll down a pdf (assume current page is 8)having more than one page(lets see 20).then when i refresh the page then pdf automatically open from page 8.Can we remove this thing in pdf.js so that it will open up from page 1 only.
Upvotes: 2
Views: 5861
Reputation: 4248
You can achieve this by setting the showPreviousViewOnLoad
to false
with this line of code.
PDFViewerApplication.viewerPrefs.showPreviousViewOnLoad = false
Upvotes: 3
Reputation: 2691
Per https://github.com/mozilla/pdf.js/blob/master/web/default_preferences.js#L24 , make the showPreviousViewOnLoad == false
Upvotes: 2