Looking for a way to capture page change via JavaScript

Community Beginner ,
Jul 12, 2018

Copy link to clipboard

Copied

Hi.

I have a multiple page document and there are buttons on the first page to direct me into different pages of the PDF. As there are buttons on the page to navigate around the PDF, I would like to disable the page change by keyboard or mouse scroll.

Is it possible to capture the page change event? or is there anyway to stop user from turning from page 1 to page 2 by mouse scroll or by page down/up keys on the keyboard for a multiple page document?

Does Adobe SDK provide a solution on this issue?

Thanks.

TOPICS
Acrobat SDK and JavaScript

Views

190

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

Looking for a way to capture page change via JavaScript

Community Beginner ,
Jul 12, 2018

Copy link to clipboard

Copied

Hi.

I have a multiple page document and there are buttons on the first page to direct me into different pages of the PDF. As there are buttons on the page to navigate around the PDF, I would like to disable the page change by keyboard or mouse scroll.

Is it possible to capture the page change event? or is there anyway to stop user from turning from page 1 to page 2 by mouse scroll or by page down/up keys on the keyboard for a multiple page document?

Does Adobe SDK provide a solution on this issue?

Thanks.

TOPICS
Acrobat SDK and JavaScript

Views

191

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
Jul 12, 2018 0
Adobe Community Professional ,
Jul 12, 2018

Copy link to clipboard

Copied

You can't stop the user using mouse or keyboard.

Workarounds:

Use for every page  a separate file.

Or use template pages. You can spawn and delete this pages.

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
Reply
Loading...
Jul 12, 2018 1
Most Valuable Participant ,
Jul 12, 2018

Copy link to clipboard

Copied

A plug-in (C++) could, if not intercept the mouse and keyboard, notice a page change and navigate itself. It is awkward though and likely to have all sorts of unforeseen messy consequences. You probably need to think in terms of a dedicated app or viewer, not a general user tool for 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
Reply
Loading...
Jul 12, 2018 1
Adobe Community Professional ,
Jul 12, 2018

Copy link to clipboard

Copied

Another option is to create a single page PDF that includes a single read-only button that's as large as the page. This button is used to display the page contents as the button's icon. The contents for each page can be stored in the PDF in hidden buttons or document-level icons. You'd have to use JavaScript to populate the button icon from these sources.

A potential downside is this is unlikely to work with any PDF viewer other than the desktop versions of Reader and Acrobat. This technique also has potential limitations and benefits with regard to printing.

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
Reply
Loading...
Jul 12, 2018 1
try67 LATEST
Most Valuable Participant ,
Jul 13, 2018

Copy link to clipboard

Copied

It is actually possible to do something like that using a script, but it's quite complicated and I don't think it's a good solution to limit the user like that.

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
Reply
Loading...
Jul 13, 2018 1