• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

Views

728

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

Copy link to clipboard

Copied

LATEST

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

Votes

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