Skip to main content
Participant
July 11, 2024
Question

Shortcut for Acrobat DC Layers ON/OFF | MAC OS

  • July 11, 2024
  • 1 reply
  • 325 views

Hello everyone,

I have a question regarding the Acrobt DC. Is there a way to assign the manual setting of layer visibility in a PDF as a shortcut? Attached is the menu I am talking about.

It does not necessarily have to be a shortcut, it can also be via the automator etc., for example.

Since I have to do this step very often during the day (show / hide layers) this would be a great help.

best regards André

 

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
July 11, 2024

If you know the name of the layer, then yes, you can do it using a script, which can be executed via a Custom Command with a single click. For example, to make the "Background" layer hidden by default use this code:

 

var ocgArray = this.getOCGs();
if (ocgArray!=null) {
	for (var i=0; i<ocgArray.length; i++)  {
		if (ocgArray[i].name=="Background") {
			ocgArray[i].initState=false;
			break;
		}
	}
}