have a pdf in which i imported several layers. Now i want to export separate pdf's for each of these layers by one click.
i could change the visibility and then export, but with a lot of layers....
It can be done with a script that will iterate over the layers, displaying
a different one each time, and then save the file under a new name.
Hiding a layer and saving the file won't remove the layer. You'll need to flatten out the invisible content for each copy, or use Illustrator scripting to implement a "distribute to layers" feature.