Is it possible to hide pages in an existing pdf document?

New Here ,
Jan 17, 2019 Jan 17, 2019

Copy link to clipboard

Copied

From Indesign I would like to generate a pdf-file to be distributed to a group of representative (they will be using the pdf file for presentations).
Now I would like my users to be able to hide selected (individual) pages in the file - without having Acrobat Pro to organise pages. Like in powerpoint where you can choose to hide a page and then un-hide it later on for a different purpose.
Is this possible in the pdf format (and preferably from Acrobat Reader)?

TOPICS
Edit and convert PDFs

Views

30.2K

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
community guidelines

correct answers 1 Correct answer

LEGEND , Jan 19, 2019 Jan 19, 2019

With recent versions of Reader and a properly set up PDF.

One needs to create hidden PDF templates from a PDF page using Acrobat and then provide some trigger like a button or bookmark to run JavaScript code to spawn the page or create a visible copy of the hidden template and then to hide one needs to provide a button or bookmark to delete the spawned page. This is not a beginners project.

Likes

Translate

Translate
Adobe Community Professional ,
Jan 18, 2019 Jan 18, 2019

Copy link to clipboard

Copied

Reader can't show or hide pages. The closest to it that it can do is spawn or delete pages from a Template object.

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
community guidelines
New Here ,
Jan 18, 2019 Jan 18, 2019

Copy link to clipboard

Copied

Thank you try67,

I'm not sure I understand you completely. Can you elaborate? Is this functions within Adobe Reader?

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
community guidelines
LEGEND ,
Jan 19, 2019 Jan 19, 2019

Copy link to clipboard

Copied

With recent versions of Reader and a properly set up PDF.

One needs to create hidden PDF templates from a PDF page using Acrobat and then provide some trigger like a button or bookmark to run JavaScript code to spawn the page or create a visible copy of the hidden template and then to hide one needs to provide a button or bookmark to delete the spawned page. This is not a beginners project.

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
community guidelines
New Here ,
Jan 20, 2019 Jan 20, 2019

Copy link to clipboard

Copied

Thank you for your response, gkaiseril... I think we will have to proceed with Powerpoint as usual since this is out of my league. Thank you for clarifying.

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
community guidelines
New Here ,
Jul 07, 2022 Jul 07, 2022

Copy link to clipboard

Copied

LATEST

Hi, hopefulluy this thread is still live... The problem with this template method is that the pages that are spawned lose the any programming that was done to do (field claculations ect.) from the original template page. Does anyone know how to dynamically have spawned pages calculate fields throughout? Meaning each page will have a set of fields that  continue to calculate as each one is added. I hope I make sense.

 

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
community guidelines
Community Beginner ,
Jan 29, 2020 Jan 29, 2020

Copy link to clipboard

Copied

Can you explain how to do this? I have a situation that I need to use this functionality.

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
community guidelines
Adobe Community Professional ,
Jan 29, 2020 Jan 29, 2020

Copy link to clipboard

Copied

This is a bit complicated to explain, but basically pages in a PDF file can be converted to something called a Template.

Templates can be made hidden or visible, and can be used to spawn pages. However, Reader can't do the former, only the latter. So the way to make pages appear or disappear in Reader is to create a Template object, hide it and set up a button (or something similar) to spawn pages from it when you want to show them, and then delete them when you want to hide them. All of the above requires using Acrobat Pro and some scripting know-how.

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
community guidelines
Participant ,
Mar 25, 2020 Mar 25, 2020

Copy link to clipboard

Copied

try67, you helped me today on an earlier question, and here you are on another relevant discussion to my situation. I have created a document that has template pages with a button to spawn them and a button to delete spawned pages. It all works fine in my tests in Acrobat and I'm real pleased (thank you again for your help).  

 

I outputted a copy that is Reader-enabled, and when I tested it in Reader, I cannot spawn pages. I did hide the template pages in the back so only the "originals" are showing.

 

Your above comment says that it does work in Reader. Everything you said above is what I did and it works fine in Acrobat, but not in Reader. Is there a setting other than the Save as Other >  Reader Extended PDF > Enable More Tools....  option that is needed. You answered a couple months ago so I know you're dealing with the latest versions of the apps.

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
community guidelines
LEGEND ,
Mar 25, 2020 Mar 25, 2020

Copy link to clipboard

Copied

Spawning templates won't work in Reader if you use Acrobat to Reader-enable the document, which is really only needed for older versions of Reader anyway. It will work in Reader (11 and DC) if you do not Reader-enable the document.

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
community guidelines
Participant ,
Mar 26, 2020 Mar 26, 2020

Copy link to clipboard

Copied

Well, that surprised me. I opened my document directly in Reader without going through the Reader-enabling process and you're right, it does work. I was not expecting that. But I'm glad! I was tempted to think my project was sunk, but try67 and others were saying it worked in Reader so I guessed there had to be some knowledge to reconcile this.

 

Thank you, George! Now I have one other question on a different thread to deal with and my project will be done.

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
community guidelines
New Here ,
Sep 29, 2021 Sep 29, 2021

Copy link to clipboard

Copied

Can you show me the javascript you use to spawn a template that is hidden and script to hide the template from view that was spawned?  Both work in Adobe DC but not for Reader DC.

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
community guidelines
Adobe Community Professional ,
Sep 29, 2021 Sep 29, 2021

Copy link to clipboard

Copied

You can't hide the spawned page. You can only delete it.

To spawn a Template use the spawn method, like this:

 

var t = this.getTemplate("MyTemplate");

t.spawn(this.numPages, true, false);

 

This will spawn a copy of the "MyTemplate" template page as the last page of the file, renaming the fields in it so that they are unique. The template can be hidden or visible, it doesn't matter.

 

To delete that page you can then use this command:

 

this.deletePages(this.numPages-1, this.numPages-1);

 

Edit: small mistake fixed in the spawn command.

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
community guidelines
Participant ,
Sep 29, 2021 Sep 29, 2021

Copy link to clipboard

Copied

In my situation, to hide the templates, you go into Organize Pages and choose the Page Templates pallete from the More menu. Then you can uncheck any of the existing templates to hide them. A script isn't needed to hide them. (My templates are hidden here so they aren't checked in the example shown.)

 

Screen Shot 2021-09-29 at 1.50.40 PM.pngScreen Shot 2021-09-29 at 1.51.00 PM.png

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
community guidelines
Adobe Community Professional ,
Mar 26, 2020 Mar 26, 2020

Copy link to clipboard

Copied

Hi

Here is a second option, in case it works for you. While Reader can't hide or show Pages, it can hide and show Layers.

To do this:

  • In your InDesign file, create a new layer for each page and move the objects to that layer
    (Will this work for your file?)
  • Export to PDF using Acrobat 6 or later. Enable the Use Layers checkbox.
  • The Layer tab will show up automatically in Reader and Layers can be hidden/shown
  • Further functionality can be set up in Acrobat Pro, such as which Layers are visible on opening. Hiding a layer does not make it hidden on open — setting it to hidden in the Options menu will do this.
  • In Acrobat Pro, you can also create buttons to show/hide Layer visibilty

 

If step 1 works for you and you need more info on any of the steps, then ask again. If step 1 won't work for your document, then the other steps don't need detailed instructions, so let us know.

 

~ Jane

 

35.png

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
community guidelines