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

Is it possible to hide or show certain pages according to certain conditions?

Participant ,
May 27, 2020 May 27, 2020

Copy link to clipboard

Copied

The question is the same as the subject.  Is it possible to hide or show certain pages according to certain conditions ?  Of course using JavaScript.

TOPICS
Acrobat SDK and JavaScript

Views

1.2K

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

Participant , May 27, 2020 May 27, 2020

I'm sorry. I found the following page after a question. I understood that it was impossible.

https://community.adobe.com/t5/acrobat/show-and-hide-pages-via-javascript-api/td-p/10359058?page=1

Votes

Translate

Translate
Participant ,
May 27, 2020 May 27, 2020

Copy link to clipboard

Copied

I'm sorry. I found the following page after a question. I understood that it was impossible.

https://community.adobe.com/t5/acrobat/show-and-hide-pages-via-javascript-api/td-p/10359058?page=1

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
Community Expert ,
May 28, 2020 May 28, 2020

Copy link to clipboard

Copied

You can effectively show and hide pages in a PDF by creating a Template for each page that you want to show or hide. To function properly in both Acrobat and Reader, hidden pages can be spawned to the end or to a specific page number in the file. Spawned pages can then be "deleted" which only deletes the spawned duplicate of the template page which will still exist to be spawned again when needed.

To "show"a page use...

 

this.getTemplate("myTemplate").spawn();

 

  

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

Copy link to clipboard

Copied

Thankyou for your reply. I will keep this knowledgement in mind for the future.

 

But this time I don't want to use it as a template. I want to make an existing page entered by the user unnecessary for the final result according to the input conditions and hide it instead of deleting it.  But I really appreciate your advice.

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

Copy link to clipboard

Copied

You can save the form data entered by the user and delete the page.

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

Copy link to clipboard

Copied

LATEST

Elaborating. The form data can be saved back to the hidden template with a very simple calculation script allowing the template page to be spawned and deleted multiple times as necessary.

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