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

Can I make Pages with print only layers to not be visible when exporting an interactive pdf?

New Here ,
Aug 23, 2017 Aug 23, 2017

I have an interactive pdf that I am creating a print version for. I have created pages with the layer that will be printed, but when I export I now have a number of blank pages. Is there a way to make those pages not visible when exported?

4.4K
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 ,
Aug 29, 2017 Aug 29, 2017

Unfortunately, I can not post the document online. It is a Classified Document. I made all of the pages that are not to be printed templates and unchecked the boxes and added the javascript action to the "Print" buttons. after printing all of the pages that I don't want visible in the digital pdf are added to the doc again. I assume that is what the delete command is for. unfortunately I did add it and it did not work. I adjusted the page numbers as page 9 through page 35 are what I want to no show, but still, have it print. I adjusted the command to

this.deletePages({nStart: 9,nEnd: 35});

 

Did I use it correctly?

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 ,
Aug 29, 2017 Aug 29, 2017

I just tested my suggestion, and here's what I found: form fields can be hidden and not printable. But, when made visible, they also become printable.

I have created a workaround that can be done with in Acrobat. Here is a link to the file I worked, download first and view in Acrobat or 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
Guide ,
Aug 30, 2017 Aug 30, 2017

You say:

I made all of the pages that are not to be printed templates ...

Did you mean ''pages that are to be printed but not showed in Acrobat? "

Otherwise I'm even more confused now...

The trick I suggested was about preventing pages from being displayed in Acrobat but printed while hitting the print button.

If you want to display pages and prevent them from being printed, then a n other javaScript action would be necessary, defining pages range for printing.

About the deleting code, please note javaScript starts numbering at 0. Meaning

this.deletePages({nStart: 9,nEnd: 35}); will delete pages 10 to 36.

Please be aware that applying javaScript instructions to a print button will never prevent a user from printing directly (Ctrl+P or file>print).

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 ,
Aug 30, 2017 Aug 30, 2017

I did everything that you did in that GIF. This was exactly what I was looking for.

I turned the pages I do not want visible, but to print into page templates. I then added var a=getTemplate("Page Templatei Title");a.spawn(); to the "Print" button to spawn these pages before printing. I then added the this.deletePages({nStart: #,nEnd: #}); to delete these pages after printing. I got this to work as desired.

Now I am looking to add these javascript commands to the File>Print menu item. How would I do so?

I tried adding the above javascripts to Document Actions>Document Will Print and Document Did Print, respectively, but it did not have the same effect. Is this the correct place to add these?

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
Guide ,
Aug 31, 2017 Aug 31, 2017

Hi BMurr2

Creating 2 functions (i.e. mySpawn and myDelete) and respectively applying them to "Will Print" and "Did Print" Document Actions definitely sounded like a great idea!

Much better than applying them to the print button(s).

Now, since you said you couldn't make it work, I got curious and tested it (Acrobat X).

As a matter of fact, "Will Print" action does NOT work as expected...

For some reason, templates get spawned AFTER the PDF is printed, while it should run BEFORE...

I honestly don't know why, and suggest (again) you ask the Acrobat Forum. This goes beyond my Acrobat skills...

This is quite frustrating... almost there, but... nope!

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 ,
Aug 31, 2017 Aug 31, 2017

Well, thank you for all your help to this point. IT's been a big help.

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
Guide ,
Aug 31, 2017 Aug 31, 2017
LATEST

You're welcome...

But I must admit I was frustrated about the Willprint event not working.

So I did ask the Acrobat javascript forum about it, and probably understood why it isn't working. (thanks to try67)

See Willprint... javascript code is triggered after the actual print here

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
Participant ,
Aug 29, 2017 Aug 29, 2017

When you export to interactive document you can leave the option for layers active to create Acrobat Layers, when you export for print, check the menu for layers in the export options window, you have to choose the option for export just visible and printable layers Screen Shot 2017-08-29 at 8.03.45 PM.png

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