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.
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
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
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();
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.
Copy link to clipboard
Copied
You can save the form data entered by the user and delete the page.
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.