Button to take user to random page

New Here ,
Jun 07, 2020 Jun 07, 2020

Copy link to clipboard

Copied

I am trying to create a set of flashcards to take a user to a random question and then another button to take the user to the answer. I have a PDF document with alternating questions and answers, about 400 pages in total. Any help would be appreciated.

TOPICS
Acrobat SDK and JavaScript, How to, PDF forms, Rich media and 3D

Views

227

Likes

translate

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 ,
Jun 07, 2020 Jun 07, 2020

Copy link to clipboard

Copied

Use this code in a MouseUp "run a JavaScript" action

 

this.pageNum = Math.round(Math.random()*this.numPages);

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Likes

translate

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