Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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".