Beenden
  • Globale Community
    • Sprache:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티

How can I toggle the individual visibility of multiple layers in a pdf?

Neu hier ,
Jul 01, 2016 Jul 01, 2016

I have a pdf which contains over a thousand layers all of which are visible.  I wan to turn all of these off so that I can then just make visible those which I need to see.  I know I can toggle groups of layers, but what I need to do is change the visibility of each individual layer to off.  It doesn't seem that I can mark multiple layers in any way and I dont really fancy having to go down a long list of layers switching each one off individually!

THEMEN
Acrobat SDK und JavaScript
801
Übersetzen
Melden
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten. Weitere Informationen
community guidelines
Community Expert ,
Jul 01, 2016 Jul 01, 2016

Hi James,

[Note - I'm going to ask that this thread be moved to the Acrobat forums]

If you have thousands of layers, but don't want to use the layers list yo toggle them individually, what is your vision? Anything other than using the list of layers to toggle on/off will require you to add buttons and programming in one of the supported scripting languages (i.e. JavaScript).

if you mean that you want to begin with all layers off, then use the layers list to turn them on (a one-time effort), then you could likely do that in the authoring program prior to exporting to PDF.

Mike

Übersetzen
Melden
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten. Weitere Informationen
community guidelines
Neu hier ,
Jul 01, 2016 Jul 01, 2016

Hi Mike,

I can activate/deactivate all the  layers at once by clicking the parent layer:

But what I was wanting to do was to turn each individual layer off or on starting with a default of all off.  It looks like the authoring program (AECOsim Building Designer) does not have this option as if I turn off the levels before I print, they do not appear at all in the pdf and there seems to be no configuration setting to alter this.

I was hoping that there was a way of selecting multiple layers and then turning them off at the child layer level....

/James

Übersetzen
Melden
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten. Weitere Informationen
community guidelines
Community Expert ,
Jul 01, 2016 Jul 01, 2016

This can be achieved in Acrobat using a script, which can be attached to a menu button for quick access, or you could run it directly from the JS Console window.

Übersetzen
Melden
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten. Weitere Informationen
community guidelines
Community Expert ,
Jul 01, 2016 Jul 01, 2016
AKTUELL

Take a look at the "state" property of the OCG object. The documentation is here:

Acrobat DC SDK Documentation - OCG.state

The documentation comes with an example of how to turn all layers on, you want to do the reverse, so just change the line that sets "ocgArray.state" and set it to "false".

Übersetzen
Melden
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten. Weitere Informationen
community guidelines