script to turn off a layer of a placed pdf in Indesign

,Im looking to be able to turn off a layer of a imported pdf that is placed into indesign cs6

this looks promising

Hum I was just about to post. I don’t even recall that old post at adobe. The mind gets fuzzy.

the problem is that the pdf has nested layers. i cant get in there to turn them off

Im not sure what you mean by nested layers.? PDF has optional content groups (layers) but these are only one level deep aren’t they.? What made this PDF you have placed.?

Indesign is creating the PDF. So when you bring this pdf into Indesign (its a proofing template) all the layers are nested into a folder named after the indesign document.