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

Script Go to template

New Here ,
Jul 18, 2019 Jul 18, 2019

Hello! I need help with a PDF form. I use Acrobat PRO DC. (hope i'm clear, english is not my first language, sorry!)

I have a PDF with a table of contents, and the rest of the pages (i created templates with them) are hidden. When i click on a radio button in the table of contents, only the concerned page shows, but it doesn't go to the page. I want it to go to that page.

I tried with the preset in Acrobat, but it doesn't work. For example, i write to go to page 4, but when the pages hide and then show again, it replaces what i wrote with page 1... I need a javascript that would tell "go to the template "XXXX". Is it possible? Or maybe "go to last page". Can somebody help me? Thanks!

TOPICS
Acrobat SDK and JavaScript
355
Translate
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 ,
Jul 18, 2019 Jul 18, 2019

How does you show the pages?

Translate
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 ,
Jul 18, 2019 Jul 18, 2019

Hi! I created templates with my pages first, and then here is my script to hide and show the the template. I apply this on every radio button in my table of contents :

if(event.target.value!="Off")

{

this.getTemplate("Template1" ).hidden=false;

this.getTemplate("Template2" ).hidden=true;

this.getTemplate("Template3" ).hidden=true;

this.getTemplate("Template4" ).hidden=true;

this.getTemplate("Template5" ).hidden=true;

this.getTemplate("Template6" ).hidden=true;

}

    else

{

this.getTemplate("Template1 ).hidden=true;

this.getTemplate("Template2" ).hidden=true;

this.getTemplate("Template3" ).hidden=true;

this.getTemplate("Template4" ).hidden=true;

this.getTemplate("Template5" ).hidden=true;

this.getTemplate("Template6" ).hidden=true;

}

Translate
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 ,
Jul 18, 2019 Jul 18, 2019
LATEST

Info: this will not work in Acrobat Reader.

Translate
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