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

Participant ,
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, Create PDFs, How to, PDF forms

Views

560

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

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

Participant ,
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, Create PDFs, How to, PDF forms

Views

561

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
May 27, 2020 0
Participant ,
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

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...
May 27, 2020 0
Adobe Community Professional ,
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();

 

  

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...
May 28, 2020 1
Participant ,
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.

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...
Jun 07, 2020 0
Adobe Community Professional ,
Jun 07, 2020

Copy link to clipboard

Copied

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

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...
Jun 07, 2020 0
Adobe Community Professional ,
Jun 08, 2020

Copy link to clipboard

Copied

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.

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...
Jun 08, 2020 0