[PDF embed API] set scroll or page

Explorer ,
Feb 02, 2021 Feb 02, 2021

Copy link to clipboard

Copied

Hi,

 

I'd like to ask if there is an API endpoints for setting the scroll position or page to view. 

 

I understand that there is events like PAGE_VIEW, PREVIEW_PAGE_VIEW_SCROLLED,  to record the current page and scroll location.

 

this is to implement a function to resume the last reading location after the pdf is closed. 

 

thanks.

Views

174

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , Feb 02, 2021 Feb 02, 2021
I have a CodePen here that demonstrates this.

Likes

Translate

Translate
Adobe Community Professional ,
Feb 02, 2021 Feb 02, 2021

Copy link to clipboard

Copied

I have a CodePen here that demonstrates this.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 02, 2021 Feb 02, 2021

Copy link to clipboard

Copied

I feel very ignorant and stupid I do not know what I'm doing I don't know
what y'all want can't you just send me a text and put in plain English the
steps one two three please I was just ready to break my phone

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 02, 2021 Feb 02, 2021

Copy link to clipboard

Copied

calm down bro. 

 

please share the issue you're facing now or what you're not sure about, I believe this community could help you. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Feb 03, 2021 Feb 03, 2021

Copy link to clipboard

Copied

LATEST

The steps are in the code but I'll outline them here. The basic concept is this, every time there is a page change, you store the page number as either a cookie or in local storage. So the order of operations is this...

When the PDF is done rendering, check to see if a page number has been stored previously for the URL, if it does, read it and scroll to that page. If not, do nothing. Then each time the page changes, store the current page number.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines