I have a problem which is driving me absolutely crazy. I will be very grateful if anyone can provide help!
I have a form application that uses Javascript to toggle the visibility of several layers (OCGs). I have a function to find an OCG by name, and then I am changing the state property to change visibility.
The problem is that the layer visibility does not change. I have confirmed that the OCG is being found, and that the state property is being changed correctly (using the Javascript console). The visibility simply doesn't match the state.
I have also confirmed that all layers are set to "Visible when on".
The strangest thing is that this was working fine in earlier versions of the document, using nearly identical code. It stopped working at some point, and I haven't been able to figure out why.
Anyone who can help is my new hero!
It appears that there are some kind of weird duplicate OCGs in the document. I wrote some code to output all of the OCGs, and there are several repeats (these do not appear in the layers list in Acrobat).
I created these by importing an Adobe Illustrator document.
Anyone come across a problem like this?